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

Prevent access and refresh tokens from being added to the user store #196

Open
Monstarrrr opened this issue Jun 17, 2024 · 0 comments
Open
Assignees
Labels
[ frontend / security Security-related tasks and concerns

Comments

@Monstarrrr
Copy link
Owner

Problem

Currently the tokens are being added to the store because we update the store with the payload data from the API response which contains the tokens as the tokens aren't sent through the Authorization header when login in.

Solution

A. Create a new object that doesn't contain them and send that to the user store instead
B. Ensure tokens are always sent through the Authorization header

I'll go with option B, even though always sending tokens through Authorization header ensures consistency for the project, this header cannot take in multiple tokens (access and refresh), so we'd need to create custom headers, which I believe is not an option provided by Djoser out of the box.

@Monstarrrr Monstarrrr self-assigned this Jun 17, 2024
@Monstarrrr Monstarrrr added feature Functionality or significant enhancement for the project security Security-related tasks and concerns bug Something isn't working and removed feature Functionality or significant enhancement for the project bug Something isn't working labels Jun 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[ frontend / security Security-related tasks and concerns
Projects
Status: No status
Development

No branches or pull requests

1 participant