Refactor authentication and session management: remove debug logging and streamline session verification

This commit is contained in:
2025-10-08 23:00:44 +01:00
parent 72410be343
commit 429649191b
3 changed files with 7 additions and 53 deletions
-8
View File
@@ -35,14 +35,6 @@ export async function POST(request: NextRequest) {
role: user[0].role as 'user' | 'admin',
});
// Debug: Check if cookie was actually set
console.log('LOGIN: Session created for user:', user[0].email);
console.log('LOGIN: Request headers:', {
host: request.headers.get('host'),
'x-forwarded-proto': request.headers.get('x-forwarded-proto'),
'user-agent': request.headers.get('user-agent')
});
// Log the login activity
await logActivity({
userId: user[0].id,