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
- [ENHANCEMENT] Use the custom Next.js dep...
Deployment adapters on Next.js are now stable! This means that we don't have to stick to the limitations of sniffing out build outputs and manually moving or mo...
- NextJS builds sudden runtime_timeout
My builds suddenly stopped working. Activating old prebuilt snapshots work, but redeploying that same code produces builds that throw runtime_timeout FRA region
- Project paused?
Hello, I have two Appwrite projects and I can not resume them for some reason. I'm using the free plan, and I saw in the pricing page that 2 free projects are a...