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
- Realtime not working for some tables
Hi, I've got an issue where I can setup a realtime connection to listen to some tables, but some not all. I have two tables `history` and `users`. Both can be ...
- CreateTables enum
What's the correct way of creating an enum column with the new definition of createTable?
- How to handle ghost accounts created by ...
Appwrite create the account with the email and send an invitation link with a secret. I am able to accept the invitation and add the account as a member on the ...