From 769987d99fb416bfcda62ca70b7b660e9421212d Mon Sep 17 00:00:00 2001 From: Jason Park Date: Mon, 2 Oct 2023 14:39:53 +0900 Subject: [PATCH] fix: fixing idToken retreaval function --- apps/forum/src/components/Thread.tsx | 12 ++++++------ apps/root/src/components/user/RedirectPage.tsx | 4 ++++ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/apps/forum/src/components/Thread.tsx b/apps/forum/src/components/Thread.tsx index f5f9d36e8..1cd3666c2 100644 --- a/apps/forum/src/components/Thread.tsx +++ b/apps/forum/src/components/Thread.tsx @@ -22,11 +22,11 @@ const Thread = () => { setUserToken(userId); } - let idToken = ""; - if (idToken?.length <= 0) { - idToken = await getIdToken(); - if (idToken?.length <= 0) return; - } + // let idToken = ""; + // if (idToken?.length <= 0) { + // idToken = await getIdToken(); + // if (idToken?.length <= 0) return; + // } // Wait for the state to update, then proceed with fetching // Fetch Threads @@ -37,7 +37,7 @@ const Thread = () => { headers: { "x-api-key": "0PaO2fHuJR9jlLLdXEDOyUgFXthoEXv8Sp0oNsb8", "Content-Type": "application/json", - Authorization: idToken, + // Authorization: idToken, }, response: true, } diff --git a/apps/root/src/components/user/RedirectPage.tsx b/apps/root/src/components/user/RedirectPage.tsx index dea3b3012..dbec45063 100644 --- a/apps/root/src/components/user/RedirectPage.tsx +++ b/apps/root/src/components/user/RedirectPage.tsx @@ -25,6 +25,10 @@ const RedirectPage = () => { redirectToHomeAfter5Sec().catch((err) => console.error(err)) }, []) + //! https://wasedatime.com/verify?error_description=Loginfail.... + + //! https://wasedatime.com/verify -> considered as success + return window.location.search.includes("error_description") ? (