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
- Report: fetch failed
https://github.com/appwrite/appwrite/issues/10989 please assign this issue to me
- Domain Verification Failed - Fastly Conf...
I am trying to add my subdomain api.getmyself.app to my Custom Domain, but I keep getting the error: Domain 'getmyself.app' is owned by another customer I have...
- Data not loading at the frontend
My App that has been working for weeks, ain't loading anything at the frontend anymore. I thought maybe the API key expired but it's not the case. Users are log...