
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
- Need help setting up this error is showi...
You can't sign in to this app because it doesn't comply with Google's OAuth 2.0 policy. If you're the app developer, register the redirect URI in the Google Cl...
- Appwrite stopped working, I can't authen...
I'm having an issue with Appwrite. It was working fine just a while ago, but suddenly it stopped working for me and can't authenticate accounts. I even went bac...
- Fail to receive the verification email a...
I added my email address to prevent it from showing "appwrite," but now I'm not receiving emails for verification or password resets. The function appears to be...
