8000 Fix device user code input styling in keycloak.v2 login theme by kathari00 · Pull Request #47283 · keycloak/keycloak · GitHub
[go: up one dir, main page]

Skip to content

Fix device user code input styling in keycloak.v2 login theme - #47283

Merged
ahus1 merged 2 commits into
keycloak:mainfrom
kathari00:fix/device-user-code-patternfly
Apr 10, 2026
Merged

ahus1 merged 2 commits into
keycloak:mainfrom
kathari00:fix/device-user-code-patternfly

Conversation

@kathari00
Copy link
Copy Markdown
Contributor

Fixes #46463

When entering a code for the OAuth 2.0 Device Authorization Grant on the device verification page, the input field was not rendered with the expected PatternFly styling in the keycloak.v2 login theme.

This change adds the missing keycloak.v2 template for the device user code page so the code input is rendered like the other PatternFly-styled login form fields.

image

@kathari00
kathari00 requested review from a team as code owners March 19, 2026 09:00
@kathari00
kathari00 force-pushed the fix/device-user-code-patternfly branch from 51e88ed to 9b29c91 Compare March 19, 2026 09:01
Comment on lines +12 to +19
<#assign error = messagesPerField.get("device_user_code")>
<@field.group name="device-user-code" label=msg("verifyOAuth2DeviceUserCode") error=error>
<span class="${properties.kcInputClass} <#if error?has_content>${properties.kcError}</#if>">
<input id="device-user-code" name="device_user_code" autocomplete="off" type="text" autofocus dir="ltr"
aria-invalid="<#if error?has_content>true</#if>"/>
<@field.errorIcon error=error />
</span>
</@field.group>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't it be done by this

Suggested change
<#assign error = messagesPerField.get("device_user_code")>
<@field.group name="device-user-code" label=msg("verifyOAuth2DeviceUserCode") error=error>
<span class="${properties.kcInputClass} <#if error?has_content>${properties.kcError}</#if>">
<input id="device-user-code" name="device_user_code" autocomplete="off" type="text" autofocus dir="ltr"
aria-invalid="<#if error?has_content>true</#if>"/>
<@field.errorIcon error=error />
</span>
</@field.group>
<@field.input name="device_user_code" label=msg("verifyOAuth2DeviceUserCode") autofocus=true />

Comment on lines +21 to +23
<@buttons.actionGroup>
<@buttons.button id="kc-login" label="doSubmit" class=["kcButtonPrimaryClass", "kcButtonBlockClass"] />
</@buttons.actionGroup>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<@buttons.actionGroup>
<@buttons.button id="kc-login" label="doSubmit" class=["kcButtonPrimaryClass", "kcButtonBlockClass"] />
</@buttons.actionGroup>
<@buttons.loginButton />

@kathari00
Copy link
Copy Markdown
Contributor Author

The same issue applies to login-passkeys-conditional-authenticate.ftl

image

@kathari00
kathari00 force-pushed the fix/device-user-code-patternfly branch 2 times, most recently from 892d41b to 3435884 Compare April 3, 2026 09:11
@kathari00
kathari00 commented Apr 3, 2026 •
Copy link
Copy Markdown
Contributor Author

I Incorporated the review and I also fixed login-passkeys-conditional-authenticate.ftl
Screenshot 2026-04-03 111412

@ahus1 ahus1 self-assigned this Apr 7, 2026
Signed-off-by: kathari00 <katharina.eiserfey1@gmail.com>
@ahus1
ahus1 force-pushed the fix/device-user-code-patternfly branch from 3435884 to d5fe2db Compare April 8, 2026 14:43
ahus1
ahus1 previously approved these changes Apr 8, 2026
@ahus1
ahus1 enabled auto-merge (squash) April 8, 2026 14:44
@ahus1
ahus1 commented Apr 8, 2026
Copy link
Copy Markdown
Member

Thank you for this contribution!

Once it is merged, it would be great if you could provide a backport to the 26.6 release branch, and then we would include it in the next 26.6 patch release.

Signed-off-by: Alexander Schwartz <alexander.schwartz@ibm.com>
@ahus1
ahus1 merged commit 29dc254 into keycloak:main Apr 10, 2026
92 of 94 checks passed
@ahus1
ahus1 commented Apr 10, 2026
Copy link
Copy Markdown
Member

Once it is merged, it would be great if you could provide a backport to the 26.6 release branch, and then we would include it in the next 26.6 patch release.

@kathari00 - With this change of the ID of the fields, I'm no longer 100% sure if this should be backported to 26.6 or not. If you would like to see the change in 26.6 instead of waiting for another 3 months, please let me know and prepare the backport. If not, then we just wait for the next release.

@kathari00
Copy link
Copy Markdown
Contributor Author

Thanks for taking a look! The change is not urgent.

@stianst stianst mentioned this pull request Jun 1, 2026
sashyo pushed a commit to tide-foundation/keycloak-IGA that referenced this pull request Jul 20, 2026
Fixes keycloak#46463

Signed-off-by: kathari00 <katharina.eiserfey1@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Input field for device user code is badly formatted

3 participants

0