I am trying to delete a user session when a login page renders, but I keep getting the sessionID is invalid, the documentation doesn't state exactly where I can get the sessionID from.
Why are you deleting a session when the login page renders?
What did you pass for the session ID?
sorry I meant when the sign up page renders, I realised that when I try to sign up a new user, and navigate to the dashboard of my application, it doesn't show the state of the current user who just signed up . So I am thinking it has to do with the session that stored in localStorage.
And I don't know exactly how to get the session ID
Can you share your code?
staying logged in is a feature so im not sure if it's a good idea to try and delete sessions when hitting the sign up page. A user shouldn't even see a sign up page if they already have a valid session since it wouldn't make sense.
After logging in, a user should be able to log out (account.deleteSession()) which would clear their cookie and the fallback cookie in local storage
Okay, I understand. But I am supposed to add the session ID as an argument in the deleteSession function. I'm not exactly sure what to use there.
As the docs explain, you can use the string current to delete the current session
https://appwrite.io/docs/client/account?sdk=web-default#accountDeleteSession
Thank you so much, I will look at it.
Recommended threads
- Problem with Google Workspace at DNS Rec...
Hello, I bought a domain at Namecheap, and Google Workspace used to work there, but now that I switched from Custom DNS to Appwrite's nameservers, it doesn't w...
- change role of a team member in Appwrite
It's not possible to add/change roles of a team meber in Appwrite Frontend. When you click on a member of a team you get forwarded to the configuration page of ...
- Session not found. Please run appwrite l...
I have encounter an issue with appwrite CLI They asking for a login session but in the doc, it’s mention that only setup client with endpoint / api key is enou...