Hi, team. I am having issue where users having to ...
# support-questions
b
Hi, team. I am having issue where users having to login more frequently(like everyday) than session and access token life time(set to 3 months & 30 days apparently). i am using thirdpartyemailpassword recipe and multiple subdomain is sharing a token(solution listed in document), localstorage instead of cookie to store tokens to be able to work within safari(solution was in this support questions channel). can someone tell me what could be the reason?
r
Hey @bian
Are you storing the session tokens in localstorage? Or in frontend cookies? Cause localstorage is not shared across sub domains.
b
hi, nice to meet you. it is being stored both in cookie and localstorage, i think. storing to localstorage was just to make supertokens work inside incognito and safari.
r
Hmmmm. I think that might cause some issues. Instead of storing in localstorage, try storing on frontend cookies using document.cookies
That will allow you to share those tokens across sub domains
And those frontend cookies can have the domain as .example.com. So it will be shared across all sub domains of example.com
b
and how can i make it work in incognito and safari at the same time?
r
So if you store in frontend cookies instead of localstorage, it will still work in safari cause you would still have to send the tokens as authorisation header anyway. The frontend cookies won’t go to your api automatically
b
We already added code on frontend to add local storage data back to cookie as in the support question thread.
Another thing i wanna know is if all sessions are revoked or removed if i restart supertokens core.
r
They aren’t removed. As long as you are not using the in memory db.