Category: Supabase and databases

Supabase MFA: TOTP code is constantly rejected

Read this guide in Polish

Authorizing application shows code, but Supabase returns invalid challenge.

How to identify the source of the problem

Check that the device clock has the correct time and if the code comes from the correct MFA account.

Compare the result for the authorized and unauthorised user, project name and exact error code.

Repair steps

Start a new challenge and use the current application code without storing it in logs.

How to Test Solution

Verification works for the current code and remains resistant to old, used codes.

Security and restrictions

Change permissions and scheme first on test data with backup. Do not put service role in your browser.