Files
diyaa.de/lib/auth.config.ts
T

23 lines
411 B
TypeScript

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;