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
- Authentication on custom Websocket Serve...
Hi, I want to use a custom Websocket Server (using Bun) for my application. However I cant really figure out authentication on custom servers. Session cookies ...
- Realtime for files() works almost well, ...
I have been trying to make use of realtime, today (14.03.26) I have pulled all the latest versions of docker images, and sdk available. Whats working: - Conn...
- Function issue
Hi,idk whats wrong with my function but i made some changes to the env var and made sure they saved then i redeployed it,but then after it redeeployed it asked ...