port-nimara-client-portal/pages/dashboard
Matt 0c9cd89667 Implement Official Keycloak JS Adapter with Proxy-Aware Configuration
MAJOR ENHANCEMENT: Complete Keycloak integration with proper HTTPS/proxy handling

## Core Improvements:

### 1. Enhanced Configuration (nuxt.config.ts)
- Added proxy trust configuration for nginx environments
- Configured baseUrl for production HTTPS enforcement
- Added debug mode configuration for development

### 2. Proxy-Aware Keycloak Composable (composables/useKeycloak.ts)
- Intelligent base URL detection (production vs development)
- Force HTTPS redirect URIs in production environments
- Enhanced debugging and logging capabilities
- Proper PKCE implementation for security
- Automatic token refresh mechanism

### 3. Dual Authentication System
- Updated middleware to support both Directus and Keycloak
- Enhanced useUnifiedAuth for seamless auth source switching
- Maintains backward compatibility with existing Directus users

### 4. OAuth Flow Implementation
- Created proper callback handler (pages/auth/callback.vue)
- Comprehensive error handling and user feedback
- Automatic redirect to dashboard on success

### 5. Enhanced Login Experience (pages/login.vue)
- Restored SSO login button with proper error handling
- Maintained existing Directus login form
- Clear separation between auth methods with visual divider

### 6. Comprehensive Testing Suite (pages/dashboard/keycloak-test.vue)
- Real-time configuration display
- Authentication status monitoring
- Interactive testing tools
- Detailed debug logging system

## Technical Solutions:

 **Proxy Detection**: Automatically detects nginx proxy and uses correct HTTPS URLs
 **HTTPS Enforcement**: Forces secure redirect URIs in production
 **Error Handling**: Comprehensive error catching with user-friendly messages
 **Debug Capabilities**: Enhanced logging for troubleshooting
 **Security**: Implements PKCE and secure token handling

## Infrastructure Compatibility:
- Works with nginx reverse proxy setups
- Compatible with Docker container networking
- Handles SSL termination at proxy level
- Supports both development and production environments

This implementation specifically addresses the HTTP/HTTPS redirect URI mismatch
that was causing 'unauthorized_client' errors in the proxy environment.
2025-06-14 15:26:26 +02:00
..
auth-test.vue Implement Keycloak authentication integration and unify user management 2025-06-14 14:09:56 +02:00
client-support.vue Update pages/dashboard/client-support.vue 2025-04-02 12:43:40 +02:00
data.vue feat: add files 2025-02-16 14:10:19 +02:00
file-browser.vue updates 2025-06-10 15:33:01 +02:00
index.vue feat: Add mobile responsiveness to interest list table and simplify dashboard routing 2025-06-04 01:40:13 +02:00
interest-analytics.vue feat: add more pages 2025-03-14 02:10:03 +02:00
interest-berth-list.vue feat: add more pages 2025-03-14 02:10:03 +02:00
interest-berth-status.vue feat: add more pages 2025-03-14 02:10:03 +02:00
interest-emails.vue feat: add emails 2025-03-31 03:30:20 +02:00
interest-eoi-queue.vue feat: add eoi queue 2025-03-31 03:24:02 +02:00
interest-list.vue fixes 2025-06-12 17:52:57 +02:00
interest-status.vue feat: add new status columns 2025-06-04 00:48:44 +03:00
keycloak-test.vue Implement Official Keycloak JS Adapter with Proxy-Aware Configuration 2025-06-14 15:26:26 +02:00
portnimaraAI.vue Update pages/dashboard/portnimaraAI.vue 2025-04-06 22:22:31 +02:00
site.vue feat: add files 2025-02-16 14:10:19 +02:00
social-media.vue updates 2025-06-05 18:26:18 +02:00