Files
Lauren Zugai f9528dbd99 fix(totp): Use otplib/preset-browser for consistent 2FA setup, handle server OTP reject
Because:
* There's an error case some users experience where it appears a client-side OTP code check is valid but our server then rejects it. We mishandle the error state and tell the user 2FA setup was successful

This commit:
* Updates our front-end OTP check in fxa-settings to use the same library our backend uses (otplib, but for the browser)
* Has auth-server throw an error if the TOTP code is invalid during set up, and handles it properly in the front-end by checking for an error, not updating apollo cache to show a successful TOTP setup if there is an error, and displays an error for the user

closes FXA-12035
2025-07-18 13:06:35 -05:00
..