port-nimara-client-portal/server/utils
Matt d45ae31f10 FEAT: Unified Authentication System - Support Both Directus and Keycloak Users
**Problem Solved:**
- File previews failing due to unsupported Directus authentication
- Encrypted OIDC cookies causing JSON parse errors
- Need both Directus and Keycloak users to access same dashboard

**Changes:**
- server/utils/auth.ts: Added Directus token validation alongside OIDC
- server/api/auth/session.ts: Support both auth methods with proper user data
- server/api/auth/logout.ts: Clear appropriate cookies based on auth method

**Authentication Methods Now Supported:**
1. X-tag headers (webhooks/external calls)
2. Directus tokens (existing Directus users)
3. OIDC sessions (Keycloak users, encrypted or plain)

**Result:**
- Both Directus and Keycloak users can access dashboard
- File previews work for all authenticated users
- Proper logout handling for each auth method
- No more JSON parse errors for encrypted OIDC cookies
2025-06-15 17:03:42 +02:00
..
auth.ts FEAT: Unified Authentication System - Support Both Directus and Keycloak Users 2025-06-15 17:03:42 +02:00
documeso.ts REVERT Network Updates 2025-06-12 21:54:47 +02:00
email-sync.ts email server updates 2025-06-12 18:05:42 +02:00
email-utils.ts Improve email loading performance and fix UI issues 2025-06-10 18:04:31 +02:00
email.ts Add EOI automation system with email processing and document management 2025-06-10 13:59:09 +02:00
encryption.ts Add email communication system with encrypted credentials 2025-06-09 21:45:06 +02:00
imap-pool.ts Improve email session management and add IMAP connection pooling 2025-06-12 15:53:12 +02:00
minio.ts Add EOI automation system with email processing and document management 2025-06-10 13:59:09 +02:00
nocodb.ts FIX: Date format issue for NocoDB PostgreSQL integration 2025-06-15 16:52:26 +02:00
operation-lock.ts Improve email session management and add IMAP connection pooling 2025-06-12 15:53:12 +02:00