JAVA-091 / Advanced
Bypassing two-factor authentication (trusting the OTP-stage session)
Why is this a problem?
Post-authentication routes can be accessed without OTP verification.
How to fix it
java
session.setAttribute("PENDING_2FA", user.getId()); // Create the authentication object and replace the session after OTP success