© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•3mo ago•
1 reply
Baran

`getAuthenticatorAssuranceLevel` returns AAL2, but `/factors` returns AAL1

Aim:
A user with 2 MFAs wants to unenroll/delete 1 MFA, then enroll a new MFA.

Issue:
Given user has 2 MFAs, when user unenrolls 1 MFA, and tries enrolling a new MFA,
/factors
/factors
endpoint return an error.
{"code":"insufficient_aal","message":"AAL2 required to enroll a new factor"}
{"code":"insufficient_aal","message":"AAL2 required to enroll a new factor"}


I expected the error not to be returned, because according to
getAuthenticatorAssuranceLevel
getAuthenticatorAssuranceLevel
, the user is already at aal2.
> const { data, error } = await supabase.auth.mfa.getAuthenticatorAssuranceLevel();
> console.log(data);
< {
    "currentLevel": "aal2",
    "nextLevel": "aal2",
    "currentAuthenticationMethods": [
        {
            "method": "mfa/phone",
            "timestamp": 1762856780
        },
        {
            "method": "totp",
            "timestamp": 1762856749
        },
        {
            "method": "password",
            "timestamp": 1762856735
        }
    ]
}
> console.log(error);
< null
> const { data, error } = await supabase.auth.mfa.getAuthenticatorAssuranceLevel();
> console.log(data);
< {
    "currentLevel": "aal2",
    "nextLevel": "aal2",
    "currentAuthenticationMethods": [
        {
            "method": "mfa/phone",
            "timestamp": 1762856780
        },
        {
            "method": "totp",
            "timestamp": 1762856749
        },
        {
            "method": "password",
            "timestamp": 1762856735
        }
    ]
}
> console.log(error);
< null


So, which one is it? Is
getAuthenticatorAssuranceLevel
getAuthenticatorAssuranceLevel
returning an incorrect response, or
/factors
/factors
?
image.png
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

resetPasswordForEmail + MFA: Cannot update password due to AAL2 requirement
SupabaseSSupabase / help-and-questions
9mo ago
Unable to Create RLS Policy on `auth.mfa_factors`
SupabaseSSupabase / help-and-questions
6mo ago
Storage API returns 0 buckets, but bucket exists in dashboard
SupabaseSSupabase / help-and-questions
7mo ago
RPC Call Returns Zero Rows But Function Works as Expected
SupabaseSSupabase / help-and-questions
4y ago