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

Unset JWT if /me endpoint called and no result #119

Open
silverbackdan opened this issue Mar 31, 2021 · 1 comment
Open

Unset JWT if /me endpoint called and no result #119

silverbackdan opened this issue Mar 31, 2021 · 1 comment
Labels
enhancement New feature or request Hacktoberfest

Comments

@silverbackdan
Copy link
Collaborator

Calling the /me endpoint looks up the current user in the database again. We now use the username to do this instead of the ID. We set the username in the 'id' attribute during denormalization, and then a custom data provider. This was because during fixture reloads the ID changes.

As we are re-checking the database though, it seems a good time to unset the JWT token if the user no longer exists, otherwise future requests would still be authenticated as using the tokens is stateless auth.

@silverbackdan silverbackdan added the enhancement New feature or request label Dec 27, 2021
@silverbackdan
Copy link
Collaborator Author

Needs checking whether this happens now or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Hacktoberfest
Projects
None yet
Development

No branches or pull requests

1 participant