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 emails
What happen if I use a third party email provider to customize my emails and my plan run out of emails/month? Appwrite emails are used as fallback sending emai...
- SyntaxError: Unexpected end of JSON inpu...
I am trying to create a fcm push notification service using appwrite functions with its REST API to invoke that function from my client side app and getting thi...
- Experiencing inconsistent "500 general_u...
I am developing a task management app that uses Appwrite auth. My project is hosted on Appwrite cloud and I've created basic server-side authentication followin...