Skip to content

Publish authentication events in WebAuthn#18938

Merged
jzheaux merged 2 commits intospring-projects:mainfrom
suuuuuuminnnnnn:gh-18113
Apr 7, 2026
Merged

Publish authentication events in WebAuthn#18938
jzheaux merged 2 commits intospring-projects:mainfrom
suuuuuuminnnnnn:gh-18113

Conversation

@suuuuuuminnnnnn
Copy link
Copy Markdown

Fixes gh-18113

WebAuthnConfigurer creates a ProviderManager directly via new ProviderManager(...),
bypassing the AuthenticationManagerBuilder pipeline that normally injects the
AuthenticationEventPublisher. As a result, WebAuthn authentication always uses
ProviderManager's default NullEventPublisher, silently ignoring any
AuthenticationEventPublisher bean registered by the user.

This commit wires the AuthenticationEventPublisher bean into the ProviderManager
using the existing getBeanOrNull() helper, matching the behavior of other
authentication mechanisms such as form login. If no bean is present, the existing
NullEventPublisher fallback is preserved.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Mar 19, 2026
@jzheaux jzheaux self-assigned this Mar 31, 2026
@jzheaux jzheaux added type: enhancement A general enhancement in: webauthn WebAuthn and Passkeys and removed status: waiting-for-triage An issue we've not yet triaged labels Mar 31, 2026
@jzheaux jzheaux added this to the 7.1.0-RC1 milestone Mar 31, 2026
Copy link
Copy Markdown
Contributor

@jzheaux jzheaux left a comment

Choose a reason for hiding this comment

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

Thanks, @suuuuuuminnnnnn! I've left some feedback inline.

@jzheaux
Copy link
Copy Markdown
Contributor

jzheaux commented Apr 6, 2026

Terribly sorry, @suuuuuuminnnnnn, as I was preparing your PR for merging, I accidentally signed both my polish commit and your original commit. 😭 Are you able to re-checkout the PR and update the signature on your commit?

@jzheaux jzheaux changed the title Fix WebAuthn to publish authentication events gh-18113 Publish authentication events in WebAuthn Apr 6, 2026
@suuuuuuminnnnnn
Copy link
Copy Markdown
Author

no worries — i’ll re-sign my commit and force-push an updated

jzheaux added 2 commits April 7, 2026 08:05
Closes spring-projectsgh-18113

Signed-off-by: suuuuuuminnnnnn <sumin45402214@gmail.com>
Issue spring-projectsgh-18113

Signed-off-by: Josh Cummings <3627351+jzheaux@users.noreply.github.com>
@jzheaux jzheaux merged commit 6d20e02 into spring-projects:main Apr 7, 2026
7 checks passed
@jzheaux
Copy link
Copy Markdown
Contributor

jzheaux commented Apr 7, 2026

Thanks for the PR, @suuuuuuminnnnnn! This is now merged into main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

in: webauthn WebAuthn and Passkeys type: enhancement A general enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

WebAuthn ignores AuthenticationEventPublisher

3 participants