refresh_token
At each call i store the refresh_token. It works fine for few days. But sometimes the refresh_token will be invalid, so i have to generate a new one in myApps.
Why is the refresh_token invalid after a unknowed time (few days) ?
At each call i store the refresh_token. It works fine for few days. But sometimes the refresh_token will be invalid, so i have to generate a new one in myApps.
Why is the refresh_token invalid after a unknowed time (few days) ?
<%= block.description %>
<% } %><%= block.description %>
<% } %>
Comments
6 comments
Hi Rico,
The refresh_token doesn't have an expiration date. It will always remain valid even if you use it several days later. Are you sure you don't have any routine sending a request to the /token endpoint that invalidates the tokens ?
You can also try - if you don't already do it - to refresh the access_token a bit before the 10800 seconds expiration to see if it can help
Have a good day,
Leslie - Community Manager
Thank you, Leslie, so i have to review the code.
Perhaps there is a bug while saveing the refresh_token.
i will see it...
Absolutely the same problem for me. Was working for many months and now the refresh_token expires after the first use. All my apps are down.
@sebastien,
For me, the most logical reason is that a request to /token endpoint is sent meanwhile, invalidating the former values but not correctly caught in your code. As said previously this refresh_token value will always remain valid unless a new call to /token endpoint is done
Have a good day,
Leslie - Community Manager
I have revised the code.
So i dont call a new token with the refresh_token.
Only if the token expired (check return value) i get a new token and refresh_token.
Now it works fine, yet.
Best regards, Rico
I checked another thread on that forum and yes, you switched to oAuth 2.0 strict mode without even noticing dev, so you arranged our connection settings to get it works. At the same time, there was an issue regarding the token expiration that has been fixed now.
Please sign in to leave a comment.