CRITICAL: Temporarily disable Keycloak to restore application functionality

- Disable Keycloak integration in authentication middleware
- Update useUnifiedAuth to only use Directus authentication
- Rebuild login page with only Directus auth form
- Remove all Keycloak references that were causing JavaScript errors
- This restores the application to working state with Directus auth only

Application should now load and function normally. Keycloak can be re-enabled later once issues are resolved.
This commit is contained in:
2025-06-14 15:07:41 +02:00
parent 8c7bf4cc00
commit fa35fcd235
3 changed files with 14 additions and 89 deletions

View File

@@ -6,7 +6,7 @@ export default defineNuxtRouteMiddleware(async (to) => {
const isAuthRequired = to.meta.auth !== false;
try {
// Check Directus auth first (more reliable)
// Only use Directus auth for now (disable Keycloak temporarily)
const { fetchUser, setUser } = useDirectusAuth();
const directusUser = useDirectusUser();
@@ -15,7 +15,10 @@ export default defineNuxtRouteMiddleware(async (to) => {
const user = await fetchUser();
setUser(user.value);
} catch (error) {
// Ignore directus auth errors
// Ignore directus auth errors for public pages
if (!isAuthRequired) {
return;
}
}
}
@@ -24,25 +27,6 @@ export default defineNuxtRouteMiddleware(async (to) => {
return;
}
// Try Keycloak auth (only if we need it)
if (isAuthRequired) {
const keycloak = useKeycloak();
// Only try to initialize if not already done
if (!keycloak.isInitialized.value) {
try {
await keycloak.initKeycloak();
} catch (error) {
console.error('Keycloak init failed:', error);
}
}
if (keycloak.isAuthenticated.value) {
// User authenticated with Keycloak
return;
}
}
// No authentication found
if (isAuthRequired) {
// Redirect to login page