8000 Realm display name localization placeholder is not expanded when resolving OTP issuer name · Issue #48680 · keycloak/keycloak · GitHub
[go: up one dir, main page]

Skip to content

Realm display name localization placeholder is not expanded when resolving OTP issuer name #48680

Closed

Description

@mabagoury

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

  1. Go to Admin Console → Realm Settings → General
  2. Set Display Name to ${realm.displayName}

Configure localization

  1. Go to Admin Console → Realm Settings → Localization
  2. In the Locales tab, enable Internationalization
  3. In the Realm overrides tab, add a realm message override for the key realm.displayName with the desired localized value (e.g., My Organization) at least for the en locale

Set up OTP

  1. Go to the Account Console → Signing In
  2. Click Set up Authenticator Application
  3. 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

  1. added theissue type on May 4, 2026
  2. self-assigned this
    on May 4, 2026
  3. mabartos commented on May 4, 2026

    @mabartos
    Member

    I'm able to reproduce the issue. Setting the priority low.

    @mabagoury The PR is more than welcome. Thanks!

  4. removed their assignment
    on May 4, 2026
  5. 23 remaining items

  6. added a commit that references this issue on Jul 20, 2026
    a2e9c96
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

Fields

No fields configured for bug.

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    0