https://supertokens.com/ logo
Title
e

engin

11/21/2022, 4:33 AM
Hi! I just came across an edge case. I'm not sure if I should just ignore it, or deal with it, but I get the sense that I should deal with it. I have not used my app for a while, as I have had other concerns the past several weeks. Now as I open my app, SuperTokens is detecting that there is an active session, so my
versionSession()
returns true, with a user ID. However, that User does not exist. It must have been deleted. So the problem seems to be: when a User gets deleted on the backend, if the user still has a cookie, the app can get "stuck" or go into an erroneous state. The obvious workaround is to just delete the cookie. I can do that because I understand enough about how this works. My users would never understand, and they would be very confused, and telling them to delete their cookie is not a great option. I can't imagine how a user would get into this state, but now I know that this is a possible state, and therefore I think I need to deal with it. Note that now that you are offering a User Dashboard, this type of case is more likely to occur! Do you have any advice?