Hi! I'm setting up logging out in a project with p...
# general
a
Hi! I'm setting up logging out in a project with phone-number login. I'm just wondering how i would destroy the session of a user if i don't have any internet connection or for some reason backend/supertokens are not responding. I'm guessing i delete the session-key from async-storage?
r
hey @Axel if you are using cookie based auth, then you can't really remove the tokens from the frontend cause the JS can't access it. What you can do is to set a flag on the frontend indicating that the user should logout, and override the doesSessionExist function on the frontend to call the originalImplementation, and if that returns
true
, check if this custom flag exists, and if it does, return
false
from the function.
a
i forgot to say thanks for the answer! we're going to look at a solution for that later on.
5 Views