Lost access to your MFA authenticator app or recovery codes

Can’t complete the multi-factor authentication (MFA) step when you sign in to the Supabase Dashboard? Sign in with a recovery code or a second authenticator app. Then replace the authenticator app you lost so you keep access to your account.

This guide covers MFA on your Supabase account. To set up MFA for the users of your own project, see Multi-factor authentication.

Diagnose the problem

Find the row that matches your situation, then go to its section.

Your situationSection
You have unused recovery codesSign in with a recovery code
You see This recovery code is invalid or has already been used. Try another code.Fix a recovery code that doesn’t work
You see Too many failed verification attempts, try again laterWait for the recovery code lock to end
Your authenticator app has a Supabase entry, but its codes don’t workError: “Invalid TOTP code entered”
You set up a second authenticator app on another deviceSign in with your other authenticator app
You don’t remember setting up MFAFind the authenticator app you used
You can’t get past the password or GitHub stepRecover your password or GitHub sign-in
You have no working authenticator app and no unused recovery codesContact support

Solve the problem

Sign in with a recovery code

A set has 10 recovery codes, and each code works one time.

  1. Sign in to the Supabase Dashboard with your usual method.
  2. On the two-factor authentication screen, under Unable to sign in?, click Authenticate using a recovery code. If you don’t see this link, you have no unused recovery codes. Contact support.
  3. Enter one of your recovery codes. Case, dashes, and spaces don’t matter.

After you sign in, replace your lost authenticator app.

Fix a recovery code that doesn’t work

The error This recovery code is invalid or has already been used. Try another code. means the code is wrong, already used, or from an older set.

  • Try another code from the latest set you saved. When you regenerate codes, every code from the previous set stops working.
  • Check that you’re signing in to the account you created the codes on. An SSO account and an account that signs in with email or GitHub are separate accounts, even when they use the same email address. Each account has its own codes.

Wait for the recovery code lock to end

After 5 incorrect codes, recovery code sign-in is locked for 15 minutes. Wait 15 minutes, then try again. Supabase Support can’t remove the lock.

Incorrect codes from earlier attempts count toward the 5. The count resets after you sign in with a valid code, after you regenerate your codes, or when a lock ends.

Sign in with your other authenticator app

If you added a second authenticator app, sign in with it. On the two-factor authentication screen, under Unable to sign in?, click Authenticate using followed by the name of your other app.

After you sign in, replace your lost authenticator app. If you also lost your recovery codes, regenerate them.

Find the authenticator app you used

The code comes from an authenticator app that you added to your Supabase account, such as 1Password, Authy, Google Authenticator, or Apple Keychain. Codes from GitHub’s two-factor authentication don’t work for this step.

Check each authenticator app you use for an entry named Supabase.

Recover your password or GitHub sign-in

Recovery codes and authenticator apps only replace the MFA step. If you can’t sign in with your password or your GitHub account, see the following guides:

Contact support

If you lost every authenticator app and have used or lost all your recovery codes, contact support.

On the two-factor authentication screen, under Unable to sign in?, click Email support to regain access. The link opens an email to support@supabase.com. Send it from the email address you sign in with, and describe what you’ve already tried.

If you sign in with SSO and can’t complete sign-in, contact support the same way.

Supabase never asks for your recovery codes or authenticator codes. Don’t include them in your email.

After you sign in

Replace a lost authenticator app

Add the new app before you remove the lost one. If you remove your only authenticator app, MFA turns off and all your recovery codes are deleted.

  1. Go to Account Settings > Security.
  2. If you already have two authenticator apps, click Remove MFA method next to one of the lost apps. You can have up to two apps, and Add MFA method only appears when you have fewer than two.
  3. Under Multi-factor authentication, click Add MFA method and set up your new authenticator app. If the name you choose already exists, choose a different name.
  4. Next to the app you lost, click Remove MFA method.

Regenerate your recovery codes

If you used some of your codes or lost them, create a new set:

  1. Go to Account Settings > Security.
  2. Under Recovery codes, click Regenerate.
  3. Save the new codes before you close the dialog. The Supabase Dashboard shows them only one time.

Your previous codes stop working immediately.

Confirm the problem is solved

Sign out, then sign in with your new authenticator app. In Account Settings > Security, check that your new app is listed under Multi-factor authentication and that Recovery codes shows how many codes you have left.

Prevent a lockout

  • Store your recovery codes in a password manager.
  • Add a second authenticator app on another device. Unlike recovery codes, it doesn’t run out.
  • When you run low on codes, or if someone else might have seen them, regenerate your codes.

Go to the GitHub discussion