Refresh auth after expiration
See original GitHub issueWhen i leave my app open for a long time, i start getting “auth token expired” -responses from firebase.
Is there a way to use the RefreshToken
for refreshing the FirebaseToken
, or should i just call a SignIn..
method again before ExpresIn
?
Issue Analytics
- State:
- Created 7 years ago
- Comments:14 (7 by maintainers)
Top Results From Across the Web
Configure Refresh Token Expiration
Under Refresh Token Expiration, enable Absolute Expiration. When enabled, a refresh token will expire based on an absolute lifetime, after which the token...
Read more >Does the refresh token expire and if so when?
ZOHO has no expiration for their refresh tokens · Auth0 rotates the refresh token for every refresh request. Regardless of implementation when ...
Read more >Refresh Tokens - OAuth 2.0 Simplified
The expiration time of the refresh token is intentionally never communicated to the client. This is because the client has no actionable steps ......
Read more >Refresh tokens in the Microsoft identity platform
Refresh tokens sent to a redirect URI registered as spa expire after 24 hours. Additional refresh tokens acquired using the initial refresh ......
Read more >When to refresh an access token?
If that happens your API call will fail and you'll need to request authorization again to get new tokens. Refresh tokens expire after...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
If you manage to implement it you can do a PR and I’ll merge it into this lib 😉
Are you sure you’d need to refresh the third party tokens as well? From what I understand from the docs and after playing with custom tokens is that any third party token is just used once initially, to receive a firebase token. That one can then be refreshed calling:
https://securetoken.googleapis.com/v1/token?key={apiKey}
Form data: grant_type:refresh_token refresh_token:{refreshToken}
Response:
So shouldn’t it be enough to check before any query/insert if the token is about to expire. And if so, do a refresh first, then go on doing the query/insert?