Skip to content

Fix WebAuthn to publish authentication events gh-18113#18938

Open
suuuuuuminnnnnn wants to merge 1 commit intospring-projects:mainfrom
suuuuuuminnnnnn:gh-18113
Open

Fix WebAuthn to publish authentication events gh-18113#18938
suuuuuuminnnnnn wants to merge 1 commit intospring-projects:mainfrom
suuuuuuminnnnnn:gh-18113

Conversation

@suuuuuuminnnnnn
Copy link

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.

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

Labels

status: waiting-for-triage An issue we've not yet triaged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

WebAuthn ignores AuthenticationEventPublisher

2 participants