Skip to content
Back

MFA Recovery Codes issue

  • 0
  • 4
  • Web
  • Cloud
Alex Bourg
9 Dec, 2025, 21:54

after creating recovery codes using account.createMFARecoveryCodes() do we need to Verify MFA factors type recovery code?

I followed this guide: https://appwrite.io/docs/products/auth/mfa

I tried to verify this using users.listMFAFactors({userId}) and account.listMFAFactors() but I am getting inconsistent results, check the screenshot

when i try to login and verify using recovery codes, it doesn't work... please let me know how this works exactly

TL;DR
Issue with MFA recovery codes in Appwrite 1.8. Recovery codes logic missing in users endpoint. Solution: Appwrite SDK's deleteMFAAuthenticator only accepts 'totp' for deleting, recovery codes can't be deleted directly. Pass keys cannot be used for MFA. Need a separate post for pass keys auth. Can't reset recovery codes using the SDK. More info: https://appwrite.io/docs/references/cloud/server-nodejs/users#updateMfaRecoveryCodes.
10 Dec, 2025, 02:29
10 Dec, 2025, 02:29

<@973276532925677569>

10 Dec, 2025, 02:31

Seems like the users endpoint is missing the logic for recovery codes.

https://github.com/appwrite/appwrite/blob/c65e5516977895c1c50caa83809101f038e52845/app/controllers/api/users.php#L1866

Can you create a GitHub issue so we don't lose track of this issue?

10 Dec, 2025, 05:44

https://github.com/appwrite/appwrite/issues/10927 created, you can assign it to me to get it fixed.

meanwhile is recovery codes are not working at all with appwrite 1.8? this is driving me crazy unless it's a bug

10 Dec, 2025, 05:45

Correct, you linked the related issue

10 Dec, 2025, 06:03

<@462046107556511744> can we delete or reset recovery codes using the users sdk ? Ai thinks: The Appwrite SDK's deleteMFAAuthenticator only accepts 'totp' as a valid type - recovery codes can't be deleted directly through that method

10 Dec, 2025, 07:14

<@462046107556511744> what is the best way to enable pass keys? would be useful to have a demo project or documentation on the website

10 Dec, 2025, 17:58

You cant use pass keys for MFA. If you want to use pass keys for auth, create a separate <#1072905050399191082> post

16 Dec, 2025, 06:06

please assign this issue to me also check my approuch is correct or not https://github.com/appwrite/appwrite/pull/10951

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more