I am currently working on a SvelteKit project that utilizes server-side rendering with 'node-appwrite' sdk. In this project, I have implemented a page that requires real-time functionality and have disabled SSR for this particular route and use the client-side 'appwrite' sdk. While the realtime subscription works as expected in the development environment, it encounters a 401 Unauthorized error when deployed to the staging environment.
Upon examining the request and response logs, I have noticed a discrepancy in the cookie handling between the two environments:
In development: A cookie named a_session_[random letters/numbers]_legacy=[token] is present, but not listed under cookies in the storage tab of developer tools is sent in the request. The token value matches the cookie set at login (e.g., my-custom-name=[token]) In staging: The cookie name matches exactly what is set during login (e.g., my-custom-name=[token]). The token value also remains consistent across requests.
I am seeking clarification on the following points:
What is the origin of the a_session_ prefix used in the development environment? Why does this prefix not appear in the staging environment? Is there any configuration or setting that could be causing this difference in behavior? Any insights into this issue would be greatly appreciated, as resolving this discrepancy is crucial for ensuring consistent functionality across the development and staging environments.
Recommended threads
- Unable to signup to appwrite cloud
When attempting to create an online cloud account on appwrite.io, I get the following message : "This email address must already be in its canonical form. Pleas...
- Email address must be in its canonical f...
Hello, Recently I was trying to signup with my GitHub account with appwrite account for availing the student benifits but while trying to signup I saw such erro...
- Login / Signup issue
So I have been trying to create an account on appwrite but no matter what I try it doesn't work. I tried using GitHub at first but after logging in it just red...