Hi, What is the best way to achive a "stay logged ...
# support-questions-legacy
l
Hi, What is the best way to achive a "stay logged in" for a long time? I dont want the users of my mobile app to login again event if they hadn't used the app for some weeks
r
Hey! By default the timeout for a session is 100 days of inactivity.
Hey.
By default the session timeout is 100 days of inactivity
You can change the refresh and access token lifetime in the core to change this
But that change applies to all the users
l
But the lifetime of access and refresh token is not 100 days
r
Well, access token is a few hours
Refresh token is 100 days
l
really? Then i have a problem in my web app. I have to login again every few hours
After inactivity
r
Hmm yea. That shouldn’t happen
Is the refreshing happening automatically?
l
Okay then i will investigate this
r
The easiest way is to login, delete the sAccessToken and then see what happens when you call an API that uses verifySession
It should return a 401, and then the refresh api should be called on its own
l
Yes but its failing. I am currently working on my mobile app, not on my web app. So i will come back to this soon.
r
Okay.
So you need to see why it’s failing.
l
Thanks for the help
r
here is an extensive list of what could be wrong for why sessions isn't working as expected: https://github.com/supertokens/supertokens-website/issues/68
l
Thanks
4 Views