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
- One-time Cloud migration blocked by data...
Hi, I’m blocked on a one-time migration from Appwrite Cloud to my self-hosted Appwrite instance. We already fixed the region issue, and the migration now corre...
- All My Project is Gone
Hello everyone, please help. Why have all my projects suddenly disappeared? I received a warning via email about one of my projects being paused. When I clicked...
- CORS errors in Obsidian custom plugin
Hi, anyone here familiar with obsidian community plugins? In short: it's a local first note app which supports writing your own add-ons / plugin But I keep get...