mirror of
https://github.com/vercel/next-learn.git
synced 2026-06-27 14:44:17 +00:00
12 lines
292 B
TypeScript
12 lines
292 B
TypeScript
import type { NextAuthConfig } from 'next-auth';
|
|
|
|
export default {
|
|
providers: [],
|
|
callbacks: {
|
|
authorized({ auth, request: { nextUrl } }) {
|
|
return !nextUrl.pathname.startsWith('/dashboard') || !!auth?.user;
|
|
},
|
|
},
|
|
pages: { signIn: '/login' },
|
|
} satisfies NextAuthConfig;
|