
Hello everyone, i'm having trouble understanding how to set the auth enviroment in dev(localhost). My idea is to get that cookie saved and use it to make request to appwrite using SSR setting the cookie manually in the request headers.
1- web sdk -> no cookies get saved, only the local storage fallback. 2-rest api -> the cookie gets set with the domain ".cloud.appwrite.io" but as soon as i refresh the page it gets deleted, i asume is something related to the domain.
So my question is how do i make the cookies get set and persisted in localhost dev?
At the moment i don't have a custom domain to set that up. I did create a web app in the appwrite console with the hostname localhost.

sorry to bother again, anyone has an example of how to implement it? thanks

You could try to modify your hosts file since you don't have a domain.

What framework are you using?

newbiew here, what would i need to include in the host file? i'm using sveltekit

Search online about hosts files

As for svelte, check out this demo: https://svelte-kit.ssr.almostapps.eu/

okey, i for sure need to learn more about it. i tried setting the local host to this domain ".cloud.appwrite.io" but didnt work. that would be the correct one to include?

You can't have the same domain (localhost) pointed at 2 different things

ohh, i will look into it. thanks for the help

i will add my two cents, i hope you don't mind. maybe it's me that is the complete newbie but it would be helpful if in the docs would say something about this and maybe provide an example on how to handle it. thanks again for the help and love appwrite!

Usually, I advise against SSR because it's very complicated.
Recommended threads
- Encountering More factors are required w...
I am encoutering the more factors error even though I am providing proper mfa code in the workflow. The following happens: 1) User provides email adress 2) Use...
- AppwriteException: Missing required para...
I'm having a problem accessing my users collection to list all my users. I was having trouble creating users but it has been resolved. I'm using react/nodejs on...
- URL attribute in "processing" state
Good day everyone! I just started learning React/Vite. In my current database right now I have these 4 attributes, and the URL attributes seems to still be in ...
