Repository navigation
54481: Fix: Added DuplicateUserLabel for OTP as i18n - #54492
Open
TheRealIndianBoi wants to merge 2 commits into
Open
TheRealIndianBoi wants to merge 2 commits into
TheRealIndianBoi wants to merge 2 commits into
Conversation
Signed-off-by: TheRealIndianDev <100276261+therealindianboi@users.noreply.github.com>
1 of 2 tasks
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues were identified for the change making duplicate OTP device-name errors localizable.
No open issues 🎉
What changed in this PR
Addresses #54481 by making the duplicate OTP device-name error localizable through Keycloak’s login theme message bundles.
Changes:
- Adds
duplicateTotpDeviceNameMessagewith an English default and a corresponding Java constant. - Uses the message key for duplicate OTP label errors.
- Updates the existing test assertion to match the message’s trailing period.
| File | Description |
|---|---|
themes/src/main/resources/theme/base/login/messages/messages_en.properties |
Adds the English default for the localizable error. |
testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/actions/AppInitiatedActionTotpSetupTest.java |
Updates the expected error text. |
services/src/main/java/org/keycloak/services/messages/Messages.java |
Defines the duplicate OTP device-name message constant. |
services/src/main/java/org/keycloak/authentication/requiredactions/UpdateTotp.java |
Uses the message constant for duplicate label validation. |
Review effort: Balanced
1 of 2 tasks
mabartos
reviewed
Nov 19, 2026
mabartos
left a comment
Member
There was a problem hiding this comment.
I've tried to analyze more places like this, but they don't probably need the effort for now - could be done in a follow-up. Just one thing, otherwise LGTM.
…ions/UpdateTotp.java Signed-off-by: Martin Bartoš <mabartos@redhat.com>
mabartos
approved these changes
Nov 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Possible fix for #54481