Skip to content

Commit 12afdc7

Browse files
Merge pull request #136 from gracymehndiratta/master
fix:removed login routes for callback
2 parents 33406d3 + b3811e9 commit 12afdc7

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/app/(auth)/auth/callback/page.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ function AuthCallbackContent() {
3131
console.error("Session error:", error);
3232
setStatus("error");
3333
setMessage("Failed to verify email. Please try again.");
34-
setTimeout(() => router.push("/login"), 3000);
34+
setTimeout(() => router.push("/"), 3000);
3535
return;
3636
}
3737

@@ -56,19 +56,19 @@ function AuthCallbackContent() {
5656
} else {
5757
setStatus("error");
5858
setMessage("Invalid verification link.");
59-
setTimeout(() => router.push("/login"), 3000);
59+
setTimeout(() => router.push("/"), 3000);
6060
}
6161
} else {
6262
// Unknown type or no type
6363
setStatus("success");
6464
setMessage("Redirecting to login...");
65-
setTimeout(() => router.push("/login"), 1000);
65+
setTimeout(() => router.push("/"), 1000);
6666
}
6767
} catch (error) {
6868
console.error("Auth callback error:", error);
6969
setStatus("error");
7070
setMessage("An error occurred. Redirecting to login...");
71-
setTimeout(() => router.push("/login"), 3000);
71+
setTimeout(() => router.push("/"), 3000);
7272
}
7373
};
7474

src/app/(auth)/oauth-callback/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export default function OAuthCallback() {
3131
setToast({ message: "Failed to get session", type: "error" });
3232
setMessage("Failed to get session. Please try again.");
3333
setError(true);
34-
setTimeout(() => router.push("/login"), 3000);
34+
setTimeout(() => router.push("/"), 3000);
3535
return;
3636
}
3737

@@ -64,7 +64,7 @@ export default function OAuthCallback() {
6464
setMessage(errorMsg);
6565
setError(true);
6666

67-
setTimeout(() => router.push("/login"), 3000);
67+
setTimeout(() => router.push("/"), 3000);
6868
}
6969
};
7070

0 commit comments

Comments
 (0)