feat: enhance middleware and authentication handling by adding health check route, improving session cookie security, and logging for debugging
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user