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
- Update row sheet not loading
After right clicking a row header and click update, the sidebar fails to load (never-ending skeleton)
- Bug report: Race condition in Flutter SD...
Hi team, I've found an intermittent bug in the Flutter SDK (v20.3.0) when using `createOAuth2Session` on Android. **Symptoms** After `createOAuth2Session` re...
- New Build not visible on Domain
I pushed some new code to my Appwrite Site and the build succeeded and is shown as active. Yet, I can only see the new version of the site on Appwrite's provide...