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(); -}