totp-require. The details object will list the method that has been required (email on this example) so it's possible to inform the user to check his email for the code.
callWithTwoFactorRequiredpassing the information as an object:
totp-invalidwill be returned;
sendEmailCodepassing the user's email or username. It's required to pass the email or username because this Method can be called when the user is not logged in.
emailOrUsernamewas not provided;
2fa:enable-email. Note that the two factor via email will only work if the user has at least one verified email.
2fa:disable-email. Note this Method requires the two factor to be executed.