+
Skip to content

fix: WebAuthNPasswordless authenticator is incorrectly sorted after all other authenticators in alternative flows #39081

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rbenedikt
Copy link

Closes #21140

The AuthenticationSelectionResolver currently sorts the WebAuthNPasswordless authenticator after all other alternative executions. As a result, it cannot be the first login option if, for example, a "UsernamePasswordForm" is also present in the flow.

To fix this behavior, I ensure that the WebAuthNPasswordless authenticator is added to the typeAuthExecMap if a user context is available, or to nonCredentialExecutions if not.
This means that:

  • When a user context is present, the execution order will follow the user's credential preferences.
  • In a userless scenario, the authenticator will be sorted according to the configuration order of the flow.

@rbenedikt rbenedikt requested a review from a team as a code owner April 18, 2025 22:47
@rbenedikt rbenedikt force-pushed the issue-21140 branch 2 times, most recently from 9ed0637 to c5dd5e9 Compare April 23, 2025 22:02
@rbenedikt rbenedikt force-pushed the issue-21140 branch 2 times, most recently from 121a67d to b2ddf4f Compare May 11, 2025 17:57
@rbenedikt rbenedikt force-pushed the issue-21140 branch 2 times, most recently from 469dfda to a7364a2 Compare June 16, 2025 12:58
@ahus1
Copy link
Contributor

ahus1 commented Jul 4, 2025

@mposolda - maybe the core-clients team can have a look at this PR.

…rted after all other authenticators in alternative flows

Signed-off-by: LAPTOP-42\Roman.Benedikt <roman.benedikt@gmx.de>
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.

When a username/password form alternative exists, WebAuthn Loginless access is too cumbersome
2 participants
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载