The Firebase JS SDK is now in BETA!
This EAP site is no longer maintained. See the official Firebase Documentation site for the latest documentation and information about the Firebase JS SDK.

Home > @firebase/auth > MultiFactorResolver > resolveSignIn

MultiFactorResolver.resolveSignIn() method

A helper function to help users complete sign in with a second factor using an MultiFactorAssertion confirming the user successfully completed the second factor challenge.

Signature:

resolveSignIn(assertion: MultiFactorAssertion): Promise<UserCredential>;

Parameters

Parameter Type Description
assertion MultiFactorAssertion The multi-factor assertion to resolve sign-in with.

Returns:

Promise<UserCredential>

The promise that resolves with the user credential object.

Example

const phoneAuthCredential = PhoneAuthProvider.credential(verificationId, verificationCode);
const multiFactorAssertion = PhoneMultiFactorGenerator.assertion(phoneAuthCredential);
const userCredential = await resolver.resolveSignIn(multiFactorAssertion);