api-components-bundle icon indicating copy to clipboard operation
api-components-bundle copied to clipboard

Unset JWT if /me endpoint called and no result

Open silverbackdan opened this issue 3 years ago • 1 comments

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 avatar Mar 31 '21 14:03 silverbackdan

Needs checking whether this happens now or not.

silverbackdan avatar Oct 07 '22 12:10 silverbackdan