Skip to content

twoFactorReauthenticate ​

Overview ​

Confirms the signed-in user's second factor 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.

Completes the mfa_reauthenticate flow, which the server requires from a user with a two-factor device before a reauthentication-guarded action.

Signature ​

twoFactorReauthenticate(payload)

Parameters ​

NameTypeRequiredDescription
payloadobjectyesThe request body.

payload Properties ​

NameTypeRequiredDefaultDescription
codestringThe code from the user's device, or a recovery code.

Returns ​

Promise

Source ​

client/lib/stores/storeUser.js:631