supertokens / supertokens-website

Frontend SDK for SuperTokens - for session management + automatically refreshing sessions
https://supertokens.com
Other
54 stars 13 forks source link

Do not store tokens in frontend cookies by default in header based auth #223

Open rishabhpoddar opened 1 year ago

rishabhpoddar commented 1 year ago

The issue with using cookie store on the frontend in header based auth is that those cookies are not secure. So during page loads, those can be sent over the network even with http.

Therefore, i think we should use localstorage by default. And then only use cookie storage if user has set frontendCookieDomain