oauthlib.oauth2.rfc6749.errors.TokenExpiredError: (token_expired) using refresh token
See original GitHub issueI am running into the error: oauthlib.oauth2.rfc6749.errors.TokenExpiredError: (token_expired)
My token settings are:
{
"token_type": "Bearer",
...
"expires_in": 3600,
"ext_expires_in": 3600,
"access_token": "xxx",
"refresh_token": "xxx",
"expires_at": 1561845080.052145
}
Now: 2019-06-30 14:09:04 Expires at: 2019-06-29 21:51:20 (1561845080.052145)
According to the datetimes above, the token is considered to be expired, yet its is_expired
property returns False
. For some reason, property expiration_datetime
is adding 90 days to the expires_at
attribute, if refresh_token
attribute is present. This does not seem correct and is causing the token expired error.
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
oauthlib.oauth2.rfc6749.errors.TokenExpiredError #35 - GitHub
rfc6749.errors.TokenExpiredError is being thrown in case the access token received is expired which causes an internal server error to be shown.
Read more >How to use the oauthlib.oauth2.rfc6749.errors.OAuth2Error ...
# "id_token token" - return the access token and the id token # "id_token" - don't return the access token if "token" in...
Read more >Flask-Dance and TokenExpiredError - python - Stack Overflow
How do you code around this error: oauthlib.oauth2.rfc6749.errors.TokenExpiredError. I spent a while trying to do a try/except block but no ...
Read more >Refreshing tokens in OAuth 2 - Requests-OAuthlib
This example shows how a simple web application (using the Flask web framework) can refresh Google OAuth 2 tokens. It should be trivial...
Read more >oauthlib.oauth2.rfc6749.errors.InvalidTokenError Example
. The Access Token obtained from an OpenID Connect Authentication Request MUST be sent as a Bearer Token, ;. It is RECOMMENDED that...
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
Hi @janscas
Thanks a lot for the answer. You are right. After looking at it again, I captured the logic you mentioned. I have to investigate it further to trace where is the refresh token process failing.
It will! Thanks