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
- Migration from Self-Hosted to Cloud seem...
Hello, I'm trying to migrate from my Self-Hosted Appwrite instance to Cloud, and can't figure out what's going wrong. - If I initiate the migration from Cloud...
- Password check in function
Hi, is there any way now for checking if the users password is correct in a function? I am creating a delete user function and before deleting I would like to c...
- custom domain on self host Appwrite
I am having a issue, i am using self host version of appwrite at my custom domain (appwrite.example.com), but when i tried adding a custom domain (project1.exam...