Jump to top

PhoneAuthSnapshot

interface

A snapshot interface of the current phone auth state.

Example
firebase.auth().verifyPhoneNumber('+4423456789')
 .on('state_changed', (phoneAuthSnapshot) => {
   console.log('Snapshot state: ', phoneAuthSnapshot.state);
 });

Properties

code

</>

The verification code. Will only be available if auto verification has taken place.

code: string | null;

error

</>

A native JavaScript error if an error occurs.

error: NativeFirebaseError | null;

state

</>

The current phone auth verification state.

state: "sent" | "timeout" | "verified" | "error";

verificationId

</>

The verification ID to build a PhoneAuthProvider credential.

verificationId: string;