Skip to content
Back

session authentication (client side setSession) doesn't work for realtime

  • 1
  • Auth
  • Web
  • Realtime
  • Cloud
Bill.IHCha
22 Mar, 2025, 10:54

I have a custom auth process for SSR which I store the session on my own instead of managed by appwrite (also prevent cookie blocking issues) but when I use realtime, in the network websocket request, the server sent message' user field is null. I would assume that means the user is not authenticated even tho setSession was used. I tried it with appwrite managed cookie and it worked. Is this by design? If so is it possible to make it a feature where you can setSession and also use real time.

TL;DR
Developers are encountering issues with session authentication not working for real-time updates when using a custom authentication process with setSession. The server appears to be receiving a null user field in messages sent via WebSocket requests. The issue seems to be related to the way the authentication is handled. One potential solution is to use appwrite managed cookies which have been reported to work. It appears that there may be a limitation in the current setup, and the option to setSession and still utilize real-time functionality simultaneously is being requested as a new feature.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more