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

Emit token_expires if token has already expired #637

Closed
coltonneil opened this issue Sep 26, 2019 · 2 comments
Closed

Emit token_expires if token has already expired #637

coltonneil opened this issue Sep 26, 2019 · 2 comments
Labels
bug For tagging faulty or unexpected behavior.

Comments

@coltonneil
Copy link

Current behavior:
A new visitor comes to my site, I configure OAuthService and get an access token. After a certain amount of time decided by my timeoutFactor OAuthService emits 'token_expires'. (as intended)

A visitor comes BACK to my site after some time and their token has already passed the timeoutFactor (but is not yet expired). OAuthService does not emit 'token_expires'.

Suggested solution:
When an access token exists OAuthService checks that tokens expiration against the timeoutFactor as part of it's initialization. If the token has already passed the timeout factor it emits 'token_expires'

Alternative:
Calling hasValidAccessToken() will emit 'token_expires' if the token has already passed the timeoutFactor (hasValidAccessToken still returns true/false based on existing logic)

@jeroenheijmans jeroenheijmans added the bug For tagging faulty or unexpected behavior. label Sep 27, 2019
@jeroenheijmans
Copy link
Collaborator

I don't have time right now to search for them, but I'm sure there's other related issues, or even PRs to improve this already.

@manfredsteyer
Copy link
Owner

should be solved with version 9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug For tagging faulty or unexpected behavior.
Projects
None yet
Development

No branches or pull requests

3 participants