session verification in offline mode
# support-questions
l
Hey, How can i handle the session verification with supertokens if my App (React) is in offline mode?
r
hey @Luxaaa what do you mean by offline mode?
l
@rp Our App is sometimes used in areas without wifi / mobile network connection. What i need is to be able to still use the app. We implemented this by caching the queried data and create a queue for any mutation wich will be executed if the user is online again.
r
right. For sessions, you can probably override the session recipe functions like doesSessionExist etc, and cache their values as well on the frontend and in case they fail due to network errors, you could return the cached values. The only thing to keep in mind here is that you may need to hack around with the value of sFrontToken in the storage to extend its lifetime since a lot of the frontend functions detect that the access token has expired by reading the expiry time of that front token. The front token is base64 JSON encoded.
l
That seems complicated. I'll try to implement this. thank you.