- The code is incorrect
- The user has reached the maximum number of attempts for this MFA flow
- The MFA flow has timed out
Error helper functions
Privy provides helper functions to parse errors raised by MFA code submission methods. Each of these functions accepts the raw error raised as a parameter, and returns aBoolean indicating if the error meets a certain condition.
- React
- React Native
- Swift
errorIndicatesMfaVerificationFailed
Indicates the user entered an incorrect MFA code. Allow the user to re-enter the code and callsubmit again.errorIndicatesMfaMaxAttempts
Indicates the user has reached the maximum number of attempts for this MFA flow. A new MFA code must be requested viainit.errorIndicatesMfaTimeout
Indicates that the current MFA code has expired. A new MFA code must be requested viainit.Example usage
- React / React Native
- Swift
Handling errors during MFA code submission

