Watch: Add two-factor login with an authenticator app | Vovy

Watch Vovy do it on a Mac: "Add two-factor authentication with Google Authenticator". Vovy adds optional two-factor login using authenticator apps, with a QR code setup screen and a code check at sign in, using Supabase MFA.

"Add two-factor authentication with Google Authenticator"

Vovy adds optional two-factor login using authenticator apps, with a QR code setup screen and a code check at sign in, using Supabase MFA.

What happens in the video

  1. Explain how 2FA works: A card shows the flow: after the password, the user types a 6-digit code from an app like Google Authenticator or 1Password, which changes every 30 seconds.
  2. Build the setup screen: In Cursor Vovy adds a security settings page that calls mfa.enroll, shows the QR code, and verifies the first code.
  3. Ask for the code at login: It checks the user's assurance level after sign in, and if 2FA is on, shows a code screen that calls mfa.challengeAndVerify.
  4. Require 2FA for sensitive data: Vovy can add database policies that require aal2, the verified level, for tables like billing or admin data.
  5. Test with your phone: It enrolls your account, you scan the QR code, and Vovy logs in again to confirm the code is required.
Read the step-by-step guide