getMfaRecoveryCodes
will return a set of 10 recovery codes. Each code is single-use.
If user doesn’t have any recovery codes generated yet, it will create them. If codes have already been generated for the user before, it will return them.
You can display them to the user and ask them to save them in a secure location.
createNewMfaRecoveryCodes
will create a new set of 10 recovery codes. Each code is single-use.
If the user still had unused recovery codes, they will be invalidated and a new set of 10 recovery codes will be created.
You can use this to allow the user to generate a new set of recovery codes in case they lose, want to rotate them, or have already used all of previous ones.
authMfaRecoveryCode
will verify the recovery code and complete the MFA challenge.
The authentication will be successful if the user enters a valid recovery code, that hasn’t been used yet.