Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Always set expiration timers for valid token types #597

Merged
merged 1 commit into from
Mar 2, 2020

Conversation

harmpauw
Copy link

@harmpauw harmpauw commented Aug 6, 2019

Instead of only setting a token expiration timer for the shortest
living token type, set timers for both token types as long as they are
valid.

This solves the remaining issue mentioned by @davdev82 in #432 and #462: If the id token has a shorter lifespan than the access token andyou configure setupAutomaticSilentRefresh to only listen to access token expiration, the token will never be refreshed. Because the filtering of the token expiration of token types now happens in setupAutomaticSilentRefresh(), setupExpirationTimers() should set timers for both token types.

With this commit, the events Observable now emits when either the id token or the access token expires (instead of only the one with the shortest lifetime), which is also more complete behavior.

Instead of only setting a token expiration timer for the shortest
living token type, set timers for both token types as long as they are
valid.
@manfredsteyer manfredsteyer merged commit 90a52b0 into manfredsteyer:master Mar 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants