question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[FR] auth: Allow expiry to be specified in .createCustomToken

See original GitHub issue

Is your feature request related to a problem? Please describe.

It would be good if you could specify the duration of time you would like the login token to be valid for. For our use at least, the result of .createCustomToken is mostly used immediately after being provided to the client, so we’d like to have a very short expiry time.

Describe the solution you’d like

Update .createCustomToken or a new method .createCustomTokenWithOptions that takes an expiry.

Describe alternatives you’ve considered

Using the details from create custom tokens using a third-party JWT library, but this seems a bit redundant when the SDK is so close to providing what is needed.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:4
  • Comments:16 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
bojeil-googlecommented, Jul 27, 2021

No chance we can have the 1 hour max increased?

Yeah, the internal service we use only allows 1 hour max and they are unlikely to change it. I would also agree with that from a security perspective.

0reactions
lahirumarambacommented, Dec 5, 2022
Read more comments on GitHub >

github_iconTop Results From Across the Web

Firebase auth set custom expiration time for custom token
The google backend currently only accepts expiration in seconds up to 1 hour. Anything more than that will give you an auth/invalid-custom-token ...
Read more >
Create Custom Tokens | Firebase Authentication - Google
Custom tokens are signed JWTs where the private key used for signing belongs to a Google service account. There are several ways to...
Read more >
Firebase Auth: Sign In Link with Custom Expiration - Medium
Create our own custom token for long lasting sign-in; Expose an endpoint that convert our custom token to a Firebase one; Use such...
Read more >
Authentication — Firebase Admin SDK for PHP Documentation
These tokens expire after one hour. $uid = 'some-uid'; $customToken = $auth->createCustomToken($uid);. You can also optionally specify additional claims to ...
Read more >
Minting Custom Tokens with the Admin SDK for Node.js
Learn how to initialize the Admin SDK for Node.js and create custom JSON ... In this Firecast, Jen Person shows you how to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found