React Native Firebase
    Preparing search index...

    A snapshot interface of the current phone auth state.

    firebase.auth().verifyPhoneNumber('+4423456789')
    .on('state_changed', (phoneAuthSnapshot) => {
    console.log('Snapshot state: ', phoneAuthSnapshot.state);
    });
    interface PhoneAuthSnapshot {
        code: string | null;
        error: ReactNativeFirebase.NativeFirebaseError | null;
        state: "sent" | "timeout" | "verified" | "error";
        verificationId: string;
    }
    Index

    Properties

    code: string | null

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

    A native JavaScript error if an error occurs.

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

    The current phone auth verification state.

    • sent: On iOS, this is the final event received. Once sent, show a visible input box asking the user to enter the verification code.
    • timeout: Auto verification has timed out. Show a visible input box asking the user to enter the verification code.
    • verified: The verification code has automatically been verified by the Android device. The snapshot contains the verification ID & code to create a credential.
    • error: An error occurred. Handle or allow the promise to reject.
    verificationId: string

    The verification ID to build a PhoneAuthProvider credential.