chore: Migrate auth to CF Workers Pt 2

This commit is contained in:
Wanjohi
2025-09-20 00:44:25 +03:00
parent d01e9945de
commit 16004c87a9
3 changed files with 23 additions and 2 deletions

View File

@@ -0,0 +1,17 @@
import { domain } from "./stage";
import { secret } from "./secrets";
import { database } from "./database";
const authStorage = new sst.cloudflare.Kv("AuthStorage");
export const auth = new sst.cloudflare.Worker("Auth", {
handler: "cloud/packages/functions/src/auth/index.ts",
domain: `auth.${domain}`,
url: true,
link: [
database,
authStorage,
secret.DISCORD_CLIENT_ID,
secret.DISCORD_CLIENT_SECRET,
],
});