Get Authenticator Assurance Level
Returns the Authenticator Assurance Level (AAL) for the active session.
- Authenticator Assurance Level (AAL) is the measure of the strength of an authentication mechanism.
- In Supabase, having an AAL of
aal1
refers to having the 1st factor of authentication such as an email and password or OAuth sign-in whileaal2
refers to the 2nd factor of authentication such as a time-based, one-time-password (TOTP). - If the user has a verified factor, the
nextLevel
field will returnaal2
, else, it will returnaal1
.
const { data, error } = await supabase.auth.mfa.getAuthenticatorAssuranceLevel()
const { currentLevel, nextLevel, currentAuthenticationMethods } = data