Repository navigation
Description
Before reporting an issue
- I have read and understood the above terms for submitting issues, and I understand that my issue may be closed without action if I do not follow them.
Area
authentication
Describe the bug
When a realm's display name is set to a localization placeholder like ${realm.displayName}, Keycloak uses that raw string as the issuer name when constructing the otpauth:// URI for OTP setup. As a result, authenticator apps (e.g. Google Authenticator, FreeOTP) display the literal placeholder instead of the resolved localized name, which is confusing and causes bad UX.
Version
26.6.0
Regression
- The issue is a regression
Expected behavior
When the realm display name is a localization placeholder like ${realm.displayName}, it should be expanded before being used as the issuer name when building the OTP key URI. This lets the authenticator app show an issuer name that is recognizable to the user.
Actual behavior
The realm display name is not expanded when building the OTP key URI. It is used directly as the issuer name. This causes the placeholder to render as-is in the authenticator app, which is confusing and causes bad UX.
How to Reproduce?
Configure realm display name
- Go to Admin Console → Realm Settings → General
- Set Display Name to
${realm.displayName}
Configure localization
- Go to Admin Console → Realm Settings → Localization
- In the Locales tab, enable Internationalization
- In the Realm overrides tab, add a realm message override for the key
realm.displayNamewith the desired localized value (e.g.,My Organization) at least for theenlocale
Set up OTP
- Go to the Account Console → Signing In
- Click Set up Authenticator Application
- Scan the QR code with an authenticator app (e.g., Google Authenticator)
Observe the issue: Observe that the issuer name shown in the app is the literal string ${realm.displayName} instead of the resolved localized value (e.g., My Organization)
Anything 10000 else?
No response
Activity
mabartos commentedon May 4, 2026
I'm able to reproduce the issue. Setting the priority low.
@mabagoury The PR is more than welcome. Thanks!
23 remaining items
Resolve realm display name localization placeholders in TOTP issuer n…