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

[BUG] Updating a User sets a Cookie #898

Open
doucsag opened this issue Oct 23, 2023 · 0 comments
Open

[BUG] Updating a User sets a Cookie #898

doucsag opened this issue Oct 23, 2023 · 0 comments

Comments

@doucsag
Copy link

doucsag commented Oct 23, 2023

Description

When updating a user, RefreshSignInAsync is called: https://github.com/fullstackhero/dotnet-webapi-boilerplate/blob/60de9b802d799ea3b4b3b35d4c5b62e32d98d410/src/Infrastructure/Identity/UserService.CreateUpdate.cs#L177

According to my research this re-reads the claims from the cookie and updates the cookie and in our case sets a new cookie on the current user which does not make sense since the API uses JWT and does not make sense when updating a user different from the one currently logged in as you'll receive a cookie with the claims of the updated user (presumably).

To Reproduce
Update a user using PUT /users/
Check the response headers.

Expected behavior
No cookie should be set.

@doucsag doucsag changed the title [BUG] [BUG] Updating a User sets a Cookie Oct 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant