Remove Discord OAuth file
This commit is contained in:
parent
02b81b4e3a
commit
1bdc7236c4
1 changed files with 0 additions and 16 deletions
16
src/oauth.ts
16
src/oauth.ts
|
@ -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();
|
||||
}
|
Loading…
Reference in a new issue