feat: enhance middleware and authentication handling by adding health check route, improving session cookie security, and logging for debugging

This commit is contained in:
Julien Froidefond
2025-10-16 23:32:33 +02:00
parent 0c66fae916
commit 57a1cb5e46
3 changed files with 24 additions and 3 deletions

View File

@@ -8,6 +8,8 @@ export async function getAuthSession(request: NextRequest) {
secret: process.env.NEXTAUTH_SECRET
});
console.log(`[getAuthSession] Token exists: ${!!token}, Secret configured: ${!!process.env.NEXTAUTH_SECRET}`);
if (!token) {
return null;
}