Using an instance of KeycloakService we have implemented the login. First calling init with configuration, client and realm data. If not logged, we call the KeycloakService instance login method with action login and the chosen locale.
This is redirecting to keycloak login with ui_locale parameter setted with the locale passed. The keycloak login is shown translated with this locale and the language selector has this locale selected. In keycloak, the realm authentication configuration has the "update user locale" required action enable.
The issue is that, when the user logs in, the user locale is not changed, so remains the previous one.
The user locale only is already changed when the locale is changed in keycloak login page, but not with the locale passed with KeycloakService login method. When the user changes the locale in keycloak login page, the url parametter setted with the chosen one is kc_locale instead of ui_locale.
Desired functionality.
The expected behavior is that, the locale passed to KeycloakService login method and setted in keyclok url ui_locale parametter, changes the user locale when the user logs in.
Bug Report or Feature Request (mark with an
x
)Versions.
angular: 16.2.0 keycloak-angular: 14.1.0 keycloak-js: 22.0.4 keycloak: 19.0.1
Repro steps.
Using an instance of KeycloakService we have implemented the login. First calling init with configuration, client and realm data. If not logged, we call the KeycloakService instance login method with action login and the chosen locale.
This is redirecting to keycloak login with ui_locale parameter setted with the locale passed. The keycloak login is shown translated with this locale and the language selector has this locale selected. In keycloak, the realm authentication configuration has the "update user locale" required action enable.
The issue is that, when the user logs in, the user locale is not changed, so remains the previous one. The user locale only is already changed when the locale is changed in keycloak login page, but not with the locale passed with KeycloakService login method. When the user changes the locale in keycloak login page, the url parametter setted with the chosen one is kc_locale instead of ui_locale.
Desired functionality.
The expected behavior is that, the locale passed to KeycloakService login method and setted in keyclok url ui_locale parametter, changes the user locale when the user logs in.