turn on SSO
This commit is contained in:
+6
-14
@@ -1,18 +1,10 @@
|
||||
// --- SSO DISABLED FOR CICD TEST ---
|
||||
// Original: protect the whole app with role-aware auth in the edge runtime.
|
||||
// import NextAuth from "next-auth";
|
||||
// import { authConfig } from "@/auth.config";
|
||||
//
|
||||
// export const { auth: middleware } = NextAuth(authConfig);
|
||||
import NextAuth from "next-auth";
|
||||
import { authConfig } from "@/auth.config";
|
||||
|
||||
// No-op replacement. The EMPTY MATCHER below is the actual kill switch — this
|
||||
// function is never invoked, and every route (including the three admin pages)
|
||||
// is open.
|
||||
export function middleware() {}
|
||||
// Edge-runtime gate for the whole app. Uses the edge-safe config only —
|
||||
// src/auth.ts pulls in node:fs via lookupRole and must never be imported here.
|
||||
export const { auth: middleware } = NextAuth(authConfig);
|
||||
|
||||
export const config = {
|
||||
// Original matcher (restore with the lines above):
|
||||
// matcher: ["/((?!api/auth|_next/static|_next/image|favicon.ico|.*\\.).*)"],
|
||||
matcher: [],
|
||||
matcher: ["/((?!api/auth|_next/static|_next/image|favicon.ico|.*\\.).*)"],
|
||||
};
|
||||
// --- END SSO DISABLED ---
|
||||
|
||||
Reference in New Issue
Block a user