Skip to content

Commit

Permalink
fix: fixing idToken retreaval function (#464)
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonNotJson authored Oct 2, 2023
1 parent 70a37d9 commit 2a9f2c8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
12 changes: 6 additions & 6 deletions apps/forum/src/components/Thread.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -37,7 +37,7 @@ const Thread = () => {
headers: {
"x-api-key": "0PaO2fHuJR9jlLLdXEDOyUgFXthoEXv8Sp0oNsb8",
"Content-Type": "application/json",
Authorization: idToken,
// Authorization: idToken,
},
response: true,
}
Expand Down
4 changes: 4 additions & 0 deletions apps/root/src/components/user/RedirectPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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") ? (
<div className="mt-20 text-center">
<LoadingSpinner theme={theme} message={t("verify.failed.title")} />
Expand Down

0 comments on commit 2a9f2c8

Please sign in to comment.