Supabase MFA: access token has AAL1 instead of AAL2
Action requiring MFA returns the refusal despite the correct login and password.
How to identify the source of the problem
Check the current assurance level session and whether the user finished the challenge of the second component.
Compare the result for the authorized and unauthorised user, project name and exact error code.
Repair steps
After a successful verify MFA refresh the session context and resume the server-controlled operation.
How to Test Solution
The usual AAL1 session is blocked where AAL2 is required and the verified runs.
Security and restrictions
Change permissions and scheme first on test data with backup. Do not put service role in your browser.