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
- User ID case sensitivity
I see that through REST (and SDK as well), getting a user is not case sensitive. And even though documentation does not clearly state that it is, the wording "V...
- Any way to temporarily bypass the email ...
Hey guys, any way to bypass the email verification to use the accounts again? i need to recover some projects that due to recent changes have been stopped, and ...
- Create a new paid tier
Current pricing seems reasonable enough about what is someone getting for 25$. But for some people most of these resouces are getting wasted. Like the bandwidt...