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
| Name | Type | Required | Description |
|---|---|---|---|
| payload | object | yes | The request body. |
payload Properties
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| method | string | The delivery method: email or sms. |
Returns
Promise
The decoded response data; undefined on success.
Source
client/lib/stores/storeUser.js:780