keycloak: `ui_locales` query parameter is ignored when `kc_idp_hint` is set

Describe the bug

When trying to set the locale for KeyCloak and hint which IDP to use, KeyCloak ignores the ui_locales hint.

Version

15.0.2

Expected behavior

KeyCloak should respect the ui_locales hint when the user gets redirected from the IdentityProvider’s site.

For example when this is the first time the user logs in, and they need to verify their e-mail address.

Actual behavior

When the kc_idp_hint parameter is set KeyCloak disrespects the ui_locales parameter.

How to Reproduce?

  • Start a local KeyCloak instance. Configure at least 2 locale-s in your instance (I’ve used English and Hungarian)
  • Configure any Identity Provider (I used google). Set the realm’s settings to require email verification
  • Open the https://www.keycloak.org/app/, and enter the credentials. Click the Save btn.
  • put a breakpoint in keycloak.js at the 502th line.
  • Append the kc_idp_hint=google&ui_locales=hu to the variable url. (Or any Locale which is not your system’s locale)
  • Continue the execution
  • Continue with the login process
  • the verify your e-mail address will be shown to you in your system’s locale.

Anything else?

No response

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 16 (13 by maintainers)

Commits related to this issue

Most upvoted comments

@kanguran @vilmosnagy I’ve replied on the PR. Sorry for the late review.

You’re correct. I misread and was thinking about kc_locale, the kc_idp_hint is a different thing of course. This seems to be a valid bug, so ignore my previous comment.

@mposolda @stianst I’ve created the PR 😉