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

Include user on refresh token result. #521

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,4 +159,4 @@ Contributed by [ניר](https://github.com/nrbnlulu) via [PR #355](https://githu

This release just updates dependencies.

Contributed by [ניר](https://github.com/nrbnlulu) via [PR #354](https://github.com/nrbnlulu/strawberry-django-auth/pull/354/)
Contributed by [ניר](https://github.com/nrbnlulu) via [PR #354](https://github.com/nrbnlulu/strawberry-django-auth/pull/354/)
5 changes: 4 additions & 1 deletion gqlauth/user/resolvers.py
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,10 @@ def resolve_mutation(cls, info, input_: RefreshTokenInput) -> ObtainJSONWebToken
return ObtainJSONWebTokenType(success=False, errors=Messages.EXPIRED_TOKEN)
# fields that are determined by if statements are not recognized by mypy.
ret = ObtainJSONWebTokenType(
success=True, token=TokenType.from_user(user), refresh_token=res # type: ignore
success=True,
token=TokenType.from_user(user),
user=user,
refresh_token=res, # type: ignore
)
if input_.revoke_refresh_token:
res.revoke()
Expand Down
Loading