Yung_Misanthrope
Cookie not being set/created?
You are right, I made a mistake, so the session, which is represented as an object had a property “secret”, session.secret is used when creating the cookie but session.secret would be empty when api key isn’t public.
64 replies
Cookie not being set/created?
So I did the following. I used the suggested values when setting cookie while also letting the api key be public.
The session secret was created but despite being logged in I would be redirected to the login page.
I then renamed the api key variable to NEXT_APPWRITE_KEY, the session secret was created but would still be redirected.
Eventually I narrowed the issue being related to the “secret” property when a session is created. The session.secret would be empty when the api key isn’t visible.
So the question that needs to be answered is how to pass the api key to the session without making it public.
64 replies
Cookie not being set/created?
Hi, thanks for trying to help, basically when I try to set cookie using the hono library, the cookie value would be empty when looking into the browser.
I managed to fix it by making the appwrite API key public in the env.local file but i’m not sure that is the best way to proceed.
64 replies