Remove Discord OAuth file

This commit is contained in:
Korbs 2024-07-16 05:18:03 -04:00
parent 02b81b4e3a
commit 1bdc7236c4

View file

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