@rtorcato/supabase-common / needsMfa
Function: needsMfa()
needsMfa(
accessToken):boolean
Defined in: claims.ts:83
Whether this session has not passed MFA yet (aal isn't aal2) — use it to
gate a step-up prompt. A token with no aal, or one that isn't a JWT, counts
as not verified (fails closed). Says nothing about whether the user has a
factor enrolled. Unverified — a UI gate only; enforce server-side with RLS on
auth.jwt() ->> 'aal'.
Parameters
accessToken
string
Returns
boolean