Update profile information form with keycloak-js adapter #608
Closed
omar-zahid
started this conversation in
General
Replies: 1 comment 2 replies
-
Hello @omar-zahid, It should look something like this (assuming chatGPT does not allucinate): const keycloak = new Keycloak({
url: 'https://your-keycloak-server/auth',
realm: 'your-realm',
clientId: 'your-client-id',
});
keycloak.init({
onLoad: 'check-sso', // or 'login-required'
checkLoginIframe: false
}).success(authenticated => {
if (!authenticated) {
keycloak.login({
locale: 'fr', // If your Keycloak server is configured to recognize this parameter
redirectUri: 'https://your-app-url', // Your redirect URL
extraParams: {
kc_action: "UPDATE_PROFILE"
}
});
}
}).error(() => {
console.log('Failed to initialize Keycloak');
}); Just out of curiosity, what's the technical limitation that prevent you from migrating to oidc-spa? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
According to the video on page https://docs.keycloakify.dev/account-theme, it's possible to access the update profile page using keycloak-js adapter. However, I can't find any method that redirects to this page.
For technical reasons, we can't use OIDC SPA library just yet.
Beta Was this translation helpful? Give feedback.
All reactions