You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The OAuth strategy uses universal storage to store the token. Using OAuth authorization_code, it's mandatory to have either cookie or localStorage enabled, because the pkce state needs to be available when you arrive at the callback. This means the access token and refresh token are stored in a cookie and are JS accessible. To us this is unacceptable, because the token should never be stored in a cookie as it is XSS vulnerable.
We don't need to use any form of storage to persist sessions, either for the access or refresh tokens. Our auth server manages the session itself. We have no need for client persistence, so we would like to store in local state.
Is it possible to enable cookie storage for pkce and state params (where it's needed), but not for tokens (where it isn't needed)?
This discussion was converted from issue #1214 on January 21, 2022 08:56.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
The OAuth strategy uses universal storage to store the token. Using OAuth authorization_code, it's mandatory to have either cookie or localStorage enabled, because the pkce state needs to be available when you arrive at the callback. This means the access token and refresh token are stored in a cookie and are JS accessible. To us this is unacceptable, because the token should never be stored in a cookie as it is XSS vulnerable.
We don't need to use any form of storage to persist sessions, either for the access or refresh tokens. Our auth server manages the session itself. We have no need for client persistence, so we would like to store in local state.
Is it possible to enable cookie storage for pkce and state params (where it's needed), but not for tokens (where it isn't needed)?
Beta Was this translation helpful? Give feedback.
All reactions