Hi,
I want to use a custom Websocket Server (using Bun) for my application. However I cant really figure out authentication on custom servers. Session cookies seem to be HTTP and secure only, which prevents me from reading them in localhost.
How would I implement the authentication here?
Bun.serve({
port: parseInt(process.env.PORT as string),
hostname: "localhost",
development: true,
async fetch(req, server) {
// ... authenticate here
if (server.upgrade(req)) {
return undefined;
}
return new Response("Upgrade failed", { status: 500 });
},
websocket: {
// ...
},
});
Recommended threads
- Realtime: Listener not triggered on upda...
I self host appwrite 1.8.1. The genereal functionallity works fine. But my realtime subscription isn't updating. I see "Received heartbeat response from realtim...
- Realtime for files() works almost well, ...
I have been trying to make use of realtime, today (14.03.26) I have pulled all the latest versions of docker images, and sdk available. Whats working: - Conn...
- Function issue
Hi,idk whats wrong with my function but i made some changes to the env var and made sure they saved then i redeployed it,but then after it redeeployed it asked ...