Can anyone point me to how to set the timeout for token-based authentication on a mobile app built with react native? Users are able to authenticate successfully but we notice that their session is perpetually kept alive in spite of the parameters defined in the system settings which is not good for our use case.
@revant_one We indeed currently use bearer token but the user session persists even after one day. We pass session id with every request and the Session ID has a 3-day lifespan and I can’t figure out how to bring that to less than a day. Could the Session ID be the issue then?
try deleting OAuth Bearer Token that were created 1 hr ago with a cron / scheduled task. Before you ask, I don’t have any sample code. Check frappe hooks for existing token delete code.
this will revoke the tokens making them invalid.
user will have to get fresh token, if the user is still in session in the mobile app, it’ll automatically create token. It won’t log out your user even if you delete all tokens. session is different, token is different.