React Native Firebase
    Preparing search index...

    Interface for module auth settings.

    const settings = firebase.auth().settings;
    console.log(settings.appVerificationDisabledForTesting);
    interface AuthSettings {
        appVerificationDisabledForTesting: boolean;
        forceRecaptchaFlowForTesting: boolean;
        setAutoRetrievedSmsCodeForPhoneNumber(
            phoneNumber: string,
            smsCode: string,
        ): Promise<null>;
    }
    Index

    Methods

    • Calling this method a second time will overwrite the previously passed parameters. Only one number can be configured at a given time.

      The phone number and SMS code here must have been configured in the Firebase Console (Authentication > Sign In Method > Phone).

      await firebase.auth().settings.setAutoRetrievedSmsCodeForPhoneNumber('+4423456789', 'ABCDE');
      

      Parameters

      • phoneNumber: string

        The users phone number.

      • smsCode: string

        The pre-set SMS code.

      Returns Promise<null>

    Properties

    appVerificationDisabledForTesting: boolean

    Flag to disable app verification for the purpose of testing phone authentication. For this property to take effect, it needs to be set before rendering a reCAPTCHA app verifier. When this is disabled, a mock reCAPTCHA is rendered instead. This is useful for manual testing during development or for automated integration tests.

    In order to use this feature, you will need to whitelist your phone number via the Firebase Console.

    Boolean value representing whether app verification should be disabled for testing.

    forceRecaptchaFlowForTesting: boolean

    Forces application verification to use the web reCAPTCHA flow for Phone Authentication.

    Once this has been called, every call to PhoneAuthProvider#verifyPhoneNumber() will skip the Play Integrity API verification flow and use the reCAPTCHA flow instead.

    Calling this method a second time will overwrite the previously passed parameter.