
Understanding check:
createAnonymousSession() registers the session with the backend
setSession() creates a cookie on the user’s computer(?)
getSession(‘current’) retrieves that cookie so that the user can pick up where they left off(?)
So I would call getSession(‘current’) on load, and if it fails I create and set a session so it doesn’t fail the next time the user visits. Is that correct?

Are you using SSR?

no

Did you go through https://appwrite.io/docs/products/auth/quick-start?

Set session is only used for SSR

GetSession only gets the session data, not any cookie or anything like that.

I believe I consulted that page, yes. I was unsure whether account.get() would work with anonymous users.
Recommended threads
- This morning the project was deleted.
Hello, We had a project transfer a month ago and my customer told me that the project was deleted today. How can I get help for this. Yours sincerely,
- Unable to read session cookie
Hi, when I am hitting Appwrite **/account** API. I am getting the user account details as expected in the response. However, with that API, Appwrite also adds a...
- Database error
My code: await databases.createDocument( process.env.APPWRITE_DATABASE, process.env.APPWRITE_COLLECTION_USER, data.userId, ...
