-
Notifications
You must be signed in to change notification settings - Fork 109
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
Token constructor method should not throw if token has expired #132
Labels
Comments
NPellet
changed the title
Token should not throw is expired in its constructor
Token constructor method should not throw if token has expired
Jan 5, 2021
I agree that this is definitely incorrect behavior and quite unfortunate. This change would require quite a complex change in the token validation scenario when you receive the token as a result of authorization flow. I will try to look into the ways to improve this. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
So I'm struggling a bit with the general workflow.
I'm trying to recreate the AccessToken from my PHP Session, but when the token is expired, the constructor throws a JWT\ExpiredException
which means I don't have access to the the hasExpired() method, and therefore also not to the refresh token.
I can get it from the raw data, but if the implementation of the structure changes my code will break.
IMHO the constructor should not throw when the token is expired.
The text was updated successfully, but these errors were encountered: