-
Notifications
You must be signed in to change notification settings - Fork 792
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
Authentication token renewal #3079
Comments
Token refresh optionsUse sessions with cookiesThe way flask-login handles token refresh is by returning a response with set cookies header. This enforces the client to set the new, refreshed session token into browser's cookies. This is not a good solution for us though, as we don't want to enforce clients to use the cookies for one because of CSRF and because it's custom code to extract tokens from cookies for non-browser users. Create a custom endpoint to refresh the token.
Refresh the token on the server sideEven though token timestamps are signed and unchangeable, we can store the last access time of the user in the database. Now the token is deemed expired if We could change this to This would require 0 work on the client part, but the following work would be needed on the server side:
|
I've opened an issue on |
Based on the discussion with the maintainers of Generate our own refresh token:We could generate a token that's exactly the same as the authentication token, but with an extended lifespan (we need to use a custom Pros: Easier refresh procedure for the client. Does not rely on the flawed "refresh" behavior of the Tasks:
Adjust the clients to refresh the token
|
Spike
Objective
Understand how we can achieve this with
flask-security-too
Output
A new issue that describes the modifications that need to be made to the Island.
Time Remaining
0d - @VakarisZ
The text was updated successfully, but these errors were encountered: