Skip to content
Back

Realtime events with SSR auth

  • 0
  • Self Hosted
  • Auth
  • Realtime
  • Web
Nebula
22 Mar, 2025, 04:56

I'm using Astro, with node-appwrite and httpOnly cookies for auth. This handles authentication for certain pages, and now I need a realtime connection to the db, under the user that's logged in - how should I go about doing this?

I presume I'd need a client-side appwrite client, but how would I make one without sending the session cookie from the server? (unless I'm thinking of that the wrong way..) - also, does this mean I'd need to use both the node-appwrite and appwrite packages separately?

Everything is local at the moment - selfhosted appwrite and a local astro page. This is probably a simple solution, but I haven't found anything besides a couple of vague or empty threads.

TL;DR
Using Astro with `node-appwrite` for auth and `httpOnly` cookies. Need realtime connection to db under logged in user. Need client-side appwrite client without sending session cookie from server. Use `node-appwrite` and `appwrite` packages separately. All local setup.
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