From 66abce42c5368e9c6caa63f9dca22d82fb76054c Mon Sep 17 00:00:00 2001 From: "Timothy Z." Date: Mon, 14 Apr 2025 17:20:54 +0300 Subject: [PATCH] revert(useapplelogin): timeoutid --- src/routes/Intro/useAppleLogin.ts | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/routes/Intro/useAppleLogin.ts b/src/routes/Intro/useAppleLogin.ts index e6a39cbb9..583dd4411 100644 --- a/src/routes/Intro/useAppleLogin.ts +++ b/src/routes/Intro/useAppleLogin.ts @@ -52,17 +52,8 @@ const useAppleLogin = (): [() => Promise, () => void] => { usePopup: true, }); - const timeoutId = setTimeout(() => { - if (started.current) { - started.current = false; - reject(new Error('Apple login popup was closed')); - } - }, 1000); window.AppleID.auth.signIn().then((response: AppleSignInResponse) => { - clearTimeout(timeoutId); - started.current = false; - if (response.authorization) { try { const idToken = response.authorization.id_token; @@ -95,8 +86,6 @@ const useAppleLogin = (): [() => Promise, () => void] => { reject(new Error('No authorization received from Apple')); } }).catch((error) => { - clearTimeout(timeoutId); - started.current = false; reject(error); }); });