Skip to content
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

Add JWT token refresh endpoint #5195

Open
khvn26 opened this issue Mar 6, 2025 · 0 comments
Open

Add JWT token refresh endpoint #5195

khvn26 opened this issue Mar 6, 2025 · 0 comments
Labels
api Issue related to the REST API

Comments

@khvn26
Copy link
Member

khvn26 commented Mar 6, 2025

  1. Expose rest_framework_simplejwt.views.TokenRefreshView. Subclass it so it sets an cookie in lieu with current auth views (see authorise_response for implementation).
  2. Extend authorise_response to set both access and refresh tokens.
  3. We'll probably need to change the SIMPLE_JWT["AUTH_TOKEN_CLASSES"] setting and switch from SlidingToken to AccessToken.
  4. Make the default token lifetime significantly shorter, as they won't be invalidated anymore.
  5. Refresh tokens should be invalidated on logout and password change.

Refer to simplejwt documentation in order to perform the above.

@khvn26 khvn26 added the api Issue related to the REST API label Mar 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Issue related to the REST API
Projects
None yet
Development

No branches or pull requests

1 participant