important
This is a contributors guide and NOT a user guide. Please visit these docs if you are using or evaluating SuperTokens.
Clear unused token transfer methods when creating new session
Status
This is just a proposal so far, it hasn't been accepted and needs further discussion.
- Status:
- proposed
- Deciders:
- rishabhpoddar, porcellus
- Proposed by:
- porcellus
- Created:
- 2022-11-22
#
Context and Problem StatementWe could end up in a situation where the user is trying to create a new session while there is one already active. If they are using the same auth mode the old session would be overwritten, but if they are different we could end up with two active sessions stored in two different ways on the frontend.
#
Considered Options- Not clearing
- Clearing
#
Decision OutcomeClear unused token transfer methods when creating new session. Reasons:
- We want to avoid tokens (especially tokens of different sessions) being present in both cookies and headers
- Refresh already clears sessions