aboutsummaryrefslogtreecommitdiffstats
path: root/src/api/auth.ts
diff options
context:
space:
mode:
authorGravatar Hassan Abouelela <[email protected]>2021-03-07 17:39:47 +0300
committerGravatar Hassan Abouelela <[email protected]>2021-03-07 17:39:47 +0300
commit7e0d4a9fffa1590353068ffd054b09c359fdadd9 (patch)
treef78754da25e94ee436ccf7b3906dcae344deaf6c /src/api/auth.ts
parentRemove Unused OAuth Scopes (diff)
Removes Unused OAuth Cleaning
Signed-off-by: Hassan Abouelela <[email protected]>
Diffstat (limited to 'src/api/auth.ts')
-rw-r--r--src/api/auth.ts9
1 files changed, 0 insertions, 9 deletions
diff --git a/src/api/auth.ts b/src/api/auth.ts
index 50f9a69..160c832 100644
--- a/src/api/auth.ts
+++ b/src/api/auth.ts
@@ -110,13 +110,6 @@ export async function getDiscordCode(scopes: OAuthScopes[]): Promise<{code: stri
"height=700,width=500,location=no,menubar=no,resizable=no,status=no,titlebar=no,left=300,top=300"
);
- // Clean up on login
- const interval = setInterval(() => {
- if (windowRef?.closed) {
- clearInterval(interval);
- }
- }, 500);
-
// Handle response
const code = await new Promise<string>(resolve => {
window.onmessage = (message: MessageEvent) => {
@@ -128,8 +121,6 @@ export async function getDiscordCode(scopes: OAuthScopes[]): Promise<{code: stri
if (message.isTrusted) {
windowRef?.close();
- clearInterval(interval);
-
// State integrity check
if (message.data.state !== state.toString()) {
// This indicates a lack of integrity