You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After reloading the page my access_token cannot be refreshed in time anymore.
Problem:
I think the problem is, that ember-simple-auth just saves the expires_in value in the localstorage. After reloading the page, the localstorage value is read again and the application waits another expires_in time to refresh the token which will be too late.
Possible solution:
Maybe its better to save a timestamp with the current_time + expires_in in the localstorage and when the application is reloaded set the timeout based on the timestamp or invalidate the session if already too late.
The text was updated successfully, but these errors were encountered:
Good point (also nice issue btw 👍); suggested solution should work perfectly.
I'm not sure whether auto-invalidating the session if it's already too late for the refresh is so great though - might be better to leave it and let the authorizationFailed hook handle the invalidation.
After reloading the page my access_token cannot be refreshed in time anymore.
Problem:
I think the problem is, that ember-simple-auth just saves the expires_in value in the localstorage. After reloading the page, the localstorage value is read again and the application waits another expires_in time to refresh the token which will be too late.
Possible solution:
Maybe its better to save a timestamp with the current_time + expires_in in the localstorage and when the application is reloaded set the timeout based on the timestamp or invalidate the session if already too late.
The text was updated successfully, but these errors were encountered: