Skip to content

Function: resolveCaaTwoFactor() ​

ts
function resolveCaaTwoFactor(
   client, 
   error, 
   code
): Promise<PrivateResponseJson>;

Completes a CAA login that stopped at the two-factor step by driving the Bloks code-entry screens and submitting the code. On success the session carries the user id and the authorization, exactly as after a login with no second factor. Pass the error caaLogin threw and the code to submit, or a source for it. A source is asked only after the code-entry screen has opened: when the code is delivered out of band (an email or SMS), opening that screen is what makes the server send it, so it cannot be known earlier.

Parameters ​

ParameterType
clientPrivateClient
errorCaaTwoFactorRequiredError
codestring | TwoFactorSource

Returns ​

Promise<PrivateResponseJson>

MIT License. Not affiliated with, endorsed or sponsored by Meta or Instagram.