E2E: add /sign-in redirect; use it in Clerk Cypress login helper
This commit is contained in:
14
frontend/src/app/sign-in/page.tsx
Normal file
14
frontend/src/app/sign-in/page.tsx
Normal 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" });
|
||||
}
|
||||
Reference in New Issue
Block a user