feat: full site build — Project/Melody schema (Option A), admin CRUD, public sections, uploads, email+SMTP, internal analytics, legal pages, docs
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
import type { NextAuthConfig } from "next-auth";
|
||||
|
||||
const authConfig = {
|
||||
providers: [],
|
||||
pages: {
|
||||
signIn: "/admin/login",
|
||||
},
|
||||
session: {
|
||||
strategy: "jwt",
|
||||
},
|
||||
callbacks: {
|
||||
authorized({ auth, request }) {
|
||||
if (request.nextUrl.pathname === "/admin/login") {
|
||||
return true;
|
||||
}
|
||||
|
||||
return Boolean(auth?.user);
|
||||
},
|
||||
},
|
||||
} satisfies NextAuthConfig;
|
||||
|
||||
export default authConfig;
|
||||
Reference in New Issue
Block a user