feat: integrate NextAuth.js for authentication, update database service to use better-sqlite3 adapter, and enhance header component with user session management
This commit is contained in:
10
src/middleware.ts
Normal file
10
src/middleware.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import NextAuth from 'next-auth';
|
||||
import { authConfig } from '@/lib/auth.config';
|
||||
|
||||
export default NextAuth(authConfig).auth;
|
||||
|
||||
export const config = {
|
||||
// Match all paths except static files and api routes that don't need auth
|
||||
matcher: ['/((?!api/auth|_next/static|_next/image|favicon.ico).*)'],
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user