turn on SSO

This commit is contained in:
s871077
2026-09-21 18:42:32 +08:00
parent 137a4a2a39
commit 167eb0807d
12 changed files with 97 additions and 102 deletions
+2 -2
View File
@@ -35,8 +35,8 @@ export const authConfig = {
authorized({ auth, request }) {
const { pathname } = request.nextUrl;
// Always let the sign-in page through, even when unauthenticated.
if (pathname === "/login") return true;
// Public: the sign-in page and the k8s readiness probe.
if (pathname === "/login" || pathname === "/api/health") return true;
// Not signed in -> Auth.js redirects to the sign-in page.
if (!auth?.user) return false;