Commit 40408ca
committed
fix: enable Spring Security factor merging so MFA can actually complete
Without @EnableMultiFactorAuthentication, a successful WebAuthn assertion
REPLACED the session authentication instead of adding to it: the user went
from satisfiedFactors=[PASSWORD] to [WEBAUTHN], never both, bouncing between
the two factor challenges forever. Spring Security 7 only merges authorities
across logins when mfaEnabled is set on the authentication filters, which the
annotation's BeanPostProcessor does. The framework's user.mfa support
configures the authorization half but not this filter half, so the demo wires
it explicitly (conditional on user.mfa.enabled).1 parent 8f11f7a commit 40408ca
1 file changed
Lines changed: 28 additions & 0 deletions
Lines changed: 28 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
0 commit comments