Spring Security 7 (part of Spring Boot 4) introduces built-in multi-factor authentication (MFA) support. The walkthrough covers setting up MFA using the @EnableMultiFactorAuthentication annotation, combining form login (username/password) with one-time token (OTT) login. Key features include smart redirect when a factor is missing, customizable factor authorities with configurable validity durations, and a pluggable OneTimeTokenService interface. A custom PinOneTimeTokenService is demonstrated to replace the default UUID token with a shorter 5-digit PIN. The setup requires minimal configuration and leverages Spring Security's built-in login templates.
•20m watch time
Sort: