Skip to content

twoFactorAuthenticate ​

Overview ​

Completes a two-factor sign-in with a code, then refetches the current user, which clears authPendingFlow. Before rejecting with an UnauthorizedError, refetches the current user, so authPendingFlow names the flow that the server now requires.

Signature ​

twoFactorAuthenticate(payload)

Parameters ​

NameTypeRequiredDescription
payloadobjectyesThe request body.

payload Properties ​

NameTypeRequiredDefaultDescription
codestringThe code from the user's device.

Returns ​

Promise

Source ​

client/lib/stores/storeUser.js:589