E2E: add /sign-in redirect; use it in Clerk Cypress login helper

This commit is contained in:
abhi1693
2026-02-07 19:06:47 +00:00
parent 388402b834
commit 8a2f792541
2 changed files with 17 additions and 2 deletions

View File

@@ -0,0 +1,14 @@
import { redirect } from "next/navigation";
import { auth } from "@clerk/nextjs/server";
export default function SignInPage() {
const { userId, redirectToSignIn } = auth();
if (userId) {
redirect("/activity");
}
// Top-level redirect to Clerk hosted sign-in.
// Cypress E2E cannot reliably drive Clerk modal/iframe login.
return redirectToSignIn({ returnBackUrl: "/activity" });
}