Monstarrrr / rebutify

Where activists improve their advocacy by building, refining and using strong rebuttals to counter the objections to their movement.
https://rebutify.org
9 stars 4 forks source link

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

Open Monstarrrr opened 3 months ago

Monstarrrr commented 3 months ago

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.