Also known as: Authenticator Assurance Level, aal1, aal2
Definition
AAL (Authenticator Assurance Level) is a JWT claim that reflects how strongly the user authenticated. AAL1 means one factor (password, OAuth, magic link). AAL2 means a second factor verified for this session (TOTP code). RLS policies read `auth.jwt() ->> 'aal'` to gate sensitive operations.
AAL stands for Authenticator Assurance Level, a NIST term for how strongly a user has proven their identity in the current session. Supabase stamps the level into the JWT as the aal claim, where aal1 is one factor and aal2 is one factor plus a verified MFA challenge.
Write a restrictive RLS policy on sensitive tables: using ((select auth.jwt() ->> 'aal') = 'aal2'). Restrictive policies AND with permissive ones, so existing user-scoping rules still apply but layered on top is the MFA requirement. UI-only gating is decoration; database-layer enforcement is architecture.
A user authenticates at AAL1 (password) and is then prompted to complete a second factor before accessing a sensitive route. Call supabase.auth.mfa.getAuthenticatorAssuranceLevel() to read currentLevel and nextLevel. If current is aal1 and next is aal2, the user has MFA enrolled but has not stepped up this session.