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
- Appwrite DNS nameservers return SERVFAIL...
My custom domain demomanasa.online (and all its subdomains) stopped resolving with ERR_NAME_NOT_RESOLVED for all visitors. I have traced the failure to Appwrite...
- Framework categorization for Sites
Hello, I want to deploy my web app via Appwrite SItes. My web app is vite+reactjs. In the Appwrite docs, it creates a vite+react app, and chooses React from the...
- Not allowed permission to upsert a prese...
```js const presenceID = ID.unique(); setPID(presenceID); const presence = await presences.upsert({ presenceId: presenceID, status: "online"...