Skip to content

sendTwoFactorAuthenticationCode ​

Overview ​

Asks the server to send a two-factor code to the device of the user who is signing in or reauthenticating, for the given method. Before rejecting with an UnauthorizedError, refetches the current user, so authPendingFlow names the flow that the server now requires.

Signature ​

sendTwoFactorAuthenticationCode(payload)

Parameters ​

NameTypeRequiredDescription
payloadobjectyesThe request body.

payload Properties ​

NameTypeRequiredDefaultDescription
methodstringThe delivery method: email or sms.

Returns ​

Promise

The decoded response data; undefined on success.

Source ​

client/lib/stores/storeUser.js:780