Skip to content

Supabase Auth errorSupabase Auth: insufficient_aal

insufficient_aal is the Supabase Auth error for an API call that needs a higher Authenticator Assurance Level than the session has. The user signed in with one factor (aal1), and the call needs a verified second factor (aal2).

Short answer

Ask the user to solve an MFA challenge: challenge and verify one of their factors, which moves the session to aal2, then retry the call. Use getAuthenticatorAssuranceLevel() to decide when to show the MFA screen instead of waiting for the error.

Rather not fix it yourself? App Fix Ticket starts with a fixed-price diagnosis, then a fixed price for the fix before any fix work.

Why the session is not aal2, and the fix

  1. 01

    The user skipped the MFA step after signing in

    “To call this API, the user must have a higher Authenticator Assurance Level. To resolve, ask the user to solve an MFA challenge.” Supabase docs, Auth error codes (insufficient_aal)

    Signing in with a password or a magic link gives aal1. Show the MFA screen after sign-in for users who have a verified factor, and only continue once verification succeeds.

  2. 02

    The user is removing a factor before verifying

    “users can only unenroll a factor after completing the enrollment flow and obtaining an aal2 JWT claim.” Supabase docs, Multi-Factor Authentication

    Supabase’s MFA guide says users can only unenroll after obtaining an aal2 claim. Verify a factor first, then unenroll.

  3. 03

    The app reads the level too late

    “Use the supabase.auth.mfa.getAuthenticatorAssuranceLevel() method to get easy access to this information in your browser app.” Supabase docs, Multi-Factor Authentication

    Check the assurance level when the app loads, not after a request fails. getAuthenticatorAssuranceLevel() reads it from the session.

  4. 04

    An old token is still in use

    “This assurance level is encoded in the aal claim in the JWT associated with the user.” Supabase docs, Multi-Factor Authentication

    Also check: the level is stored in the JWT, so a request sent with a token from before verification still carries aal1. Send requests with the session from after verification.

Checked against the vendor’s docs on : Supabase docs: Auth error codes; Supabase docs: Multi-Factor Authentication.

Rather hand it over?

Fixed scope, fixed price, paid upfront. The work happens in writing; no call needed.

“Very responsive, attentive to fixing bugs, and completed the project as needed! Thank you!”
A buyer in the United States, July 2022. Shopify on Fiverr
All 127 Fiverr reviews

Related: Supabase mfa_verification_failed · Supabase new row violates row-level security · Supabase over_sms_send_rate_limit · Supabase Edge Function WORKER_LIMIT

Questions

More on this error

What are aal1 and aal2?

aal1 means the user signed in with one factor, such as a password or magic link. aal2 means their identity was also verified with a second factor, such as a TOTP code.

Can row level security require aal2?

Yes. Supabase’s MFA guide shows restrictive RLS policies that check the aal claim, and warns not to omit the as restrictive clause.

Can you fix it for me?

If one bug is the whole problem, the App Fix Ticket covers it: a written diagnosis first, then the fix. If the app has more going on, the Launch Check is a written check of the whole app. Each issue found is rated critical, high, medium or low, with where it is and how it was confirmed. No issues worth fixing, no charge. If the Launch Check finds nothing rated medium or higher, Simon refunds the full $450. You keep the report either way. This applies to the first 10 Launch Checks bought after October 30, 2026.

A different error?

Describe it and get a written quote

Send the error and what you were doing. You get a written scope, a fixed price and a timeline; Simon replies by email, usually within one business day.