From 1bdc7236c4ef2ed0ae4d585deac4f554b0fb28cf Mon Sep 17 00:00:00 2001 From: Korbs Date: Tue, 16 Jul 2024 05:18:03 -0400 Subject: [PATCH] Remove Discord OAuth file --- src/oauth.ts | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 src/oauth.ts diff --git a/src/oauth.ts b/src/oauth.ts deleted file mode 100644 index 433d85d..0000000 --- a/src/oauth.ts +++ /dev/null @@ -1,16 +0,0 @@ -export async function signInWithDiscord() { - const url = new URL( - `${import.meta.env.PUBLIC_APPWRITE_ENDPOINT}/account/sessions/oauth2/discord` - ); - - const origin = window.location.origin; - - url.searchParams.set("project", import.meta.env.PUBLIC_APPWRITE_PROJECT_ID!); - url.searchParams.set("success", `${origin}/account`); - url.searchParams.set("failure", `${origin}/signin`); - - /* Important: For SSR we set token=true to get a auth token in the success URL */ - url.searchParams.set("token", `true`); - - window.location.href = url.toString(); -}