MAJOR: Replace nuxt-openid-connect with official Keycloak JS adapter
- Remove problematic nuxt-openid-connect module that was causing OAuth issues - Install and implement official keycloak-js adapter for better reliability - Create new useKeycloak composable with proper token management - Update useUnifiedAuth to work with new Keycloak implementation - Fix authentication middleware to support both auth methods - Update login page to use new Keycloak login function - Clean up configuration and remove deprecated OIDC settings - This should resolve all the HTTP/HTTPS redirect and token exchange issues
This commit is contained in:
@@ -114,8 +114,8 @@ definePageMeta({
|
||||
// Directus auth
|
||||
const { login } = useDirectusAuth();
|
||||
|
||||
// OIDC auth for Keycloak
|
||||
const oidc = useOidc();
|
||||
// Keycloak auth for SSO
|
||||
const keycloak = useKeycloak();
|
||||
|
||||
const loading = ref(false);
|
||||
const errorThrown = ref(false);
|
||||
@@ -127,9 +127,9 @@ const passwordVisible = ref(false);
|
||||
const valid = ref(false);
|
||||
|
||||
// Keycloak login function
|
||||
const loginWithKeycloak = () => {
|
||||
// Redirect to dashboard after login
|
||||
oidc.login('/dashboard');
|
||||
const loginWithKeycloak = async () => {
|
||||
// Initialize and login with Keycloak
|
||||
await keycloak.login();
|
||||
};
|
||||
|
||||
// Directus login function
|
||||
|
||||
Reference in New Issue
Block a user