feat: integrate authentication and password management features, including bcrypt for hashing and NextAuth for session handling

This commit is contained in:
Julien Froidefond
2025-11-30 08:04:06 +01:00
parent 7cb1d5f433
commit d663fbcbd0
30 changed files with 3287 additions and 4164 deletions

22
middleware.ts Normal file
View File

@@ -0,0 +1,22 @@
import { withAuth } from "next-auth/middleware";
export default withAuth({
pages: {
signIn: "/login",
},
});
export const config = {
matcher: [
/*
* Match all request paths except for the ones starting with:
* - api/auth (authentication routes)
* - login (login page)
* - _next/static (static files)
* - _next/image (image optimization files)
* - favicon.ico (favicon file)
*/
"/((?!api/auth|login|_next/static|_next/image|favicon.ico).*)",
],
};