Add the refresh token to the outstanding db after refreshing#696
Open
ratataque wants to merge 2 commits intojazzband:masterfrom
Open
Add the refresh token to the outstanding db after refreshing#696ratataque wants to merge 2 commits intojazzband:masterfrom
ratataque wants to merge 2 commits intojazzband:masterfrom
Conversation
|
Great work 👏 |
|
This needs to be merged. |
|
This is what I need. came here to check if anyone made a PR or not. You are awesome 😄 |
| OutstandingToken.objects.create( | ||
| user=user, | ||
| jti=refresh[api_settings.JTI_CLAIM], | ||
| token=str(refresh), |
There was a problem hiding this comment.
Suggested change
| token=str(refresh), | |
| token=data["refresh"], |
This part where we encode refresh token is used twice in this code. One is here on line number 137 and another is on line:142
Maybe its bad idea to repeat this code, because in future refactor to change or update this value we might need to look into 2 places.
My suggestion will be move 142 on top then use token = data["refresh" ]
Hope this gets merged soon 😃
mohitpandeyji
approved these changes
Sep 10, 2024
|
If help is needed for changes I can help out. I need to use a fork with these changes otherwise. Thanks in advance. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix the Issue #363
By allowing the refreshtoken to be saved to the outstanding database after being refreshed.
It is useful for blacklisting every token for a precise user, if there's a leak of the token