losfrogerOriginal post
Web Developer
I was trying to follow the docs to activate MFA: https://appwrite.io/docs/products/auth/mfa
But when I called the account.updateMFA(true) I got the following exception:
AppwriteException: Invalid document structure: Attribute "factors" must be an array
idk if there's a missing step in the docs or I'm doing it incorrectly
This is the code I'm using (it's vue 3, but this is just JS):
Summary
Developers are encountering an error with the `updateMFA(true)` call when implementing MFA. The exception thrown mentions that the "factors" attribute must be an array, and this issue arises when trying to update MFA. The issue may lie in the format of the data being sent during the updateMFA call. Check the structure being passed to this function to ensure it meets the requirements. You may need to adjust the data or consult the docs for the correct format.