Maybe I'm not storing the session ID in cookies after login. Is there an extra step I need to do for this?
Is this code executed client side or server side?
Server side I think, using +page.server.ts on sveltekit
Then that's the problem
You will need executing it client sided to get a session
Okay this is helpful I'll try working this out with this new information π
Sorry for the silly questions this is my first project
Not silly at all! SSR is tough right now and we're planning on improving the experience there
I guess without SSR there is no way to add middlesware to protect route (if not authentificated) ?
welcome to the team π΅βπ«
Thanks, I would try and post a video about my experience using appwrite as a first time web creator once I get to the end π
I'd be curious to see if you're having the same issues
If you still need for any reason server side rendering, the best way to go is probably by sending to the server a Jwt token. In other words you perform things like login/signup client side and then any other things, server-sided. If the page doesn't needs SEO (for example, a dashboard, a chat like WhatsApp, etc), or it just really doesn't needs SSR, since most things are changing dynamically, then just go with client side rendering, probably it will be easier
I'll see what happens, once it's all working I'll share the git so the community can correct any security issues I may have made π
Thanks I'll attempt to get this working on the client side
but for example I have profile user page like mywebsite.com/@amesky , and I wanna add in the metdata description (which is a server component only), data of the user, how can I get the data in server side with APpwrite ?
That why Im a little bit confused with the notion of server and client side
damn im stupid forget what ive said APPWRITE IS AMAZING
You are right about the cookies, it seems to he sending the session ID to local storage instead instead labeled cookie fallback
Any suggestions on how to resolve this
I'll do some research and work this out, thanks I understand the problem now and I can see what's going wrong
That's a fallback system when you don't have domain set up for cookies. Ideally, you'd be making API calls client side and your Appwrite endpoint is a sub domain of your app's domain
Thanks I got it working using the client π
[SOLVED] How to login and create a session
Recommended threads
- Custom API domain is unreachable
Earlier my custom api domain was working fine. Now it seems to be offline without a trace a few hours later. I didn't change anything, all the relevant DNS reco...
- "Invalid console fingerprint" when unpau...
I've tried logging out and logging back in, still can't figure out why this is happening.
- Inviting members while SMTP is disabled ...
Issue: https://github.com/appwrite/console/issues/3125 PR: https://github.com/appwrite/console/pull/3126