Skip to content

verifier._reset is not a function. (In 'verifier._reset()', 'verifier._reset' is undefined) #5688

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wahas-mughal opened this issue Oct 30, 2021 · 2 comments

Comments

@wahas-mughal
Copy link

wahas-mughal commented Oct 30, 2021

  • Operating System version: Windows 20H2
  • Browser version: CCleaner Browser 94.0.12470.84 (Official Build) (64-bit)
  • Firebase SDK version: 9.2.0
  • Firebase Product: AUTH
  • Expo SDK: 43
  • Node: 12.13.1

I'm implementing firebase phone auth but getting the below error:

verifier._reset is not a function. (In 'verifier._reset()', 'verifier._reset' is undefined) when getting token

  const auth = getAuth();
  const phoneProvider = new PhoneAuthProvider(auth);

  const id = await phoneProvider.verifyPhoneNumber(
    this.state.phoneNumber, //valid
    this.recaptchaVerifier.current //valid
  ); // throughs the message here
  
 //not reaching here
 console.log(id)

Although right after it, I'm receiving the OTP. But not getting token, required to complete the OTP verification.

STEPS TO REPRODUCE:

Installation:
expo install firebase

Code:

    const auth = getAuth();
    const phoneProvider = new PhoneAuthProvider(auth);    
    const id = await phoneProvider.verifyPhoneNumber(
     this.state.phoneNumber,
     this.recaptchaVerifier.current
 ); // throughs the message here
@google-oss-bot
Copy link
Contributor

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

@sam-gc
Copy link
Contributor

sam-gc commented Nov 1, 2021

I think this issue should probably be raised with Expo. In v9, there is an expectation that the RecaptchaVerifier has an internal method called _reset(). As I understand it, Expo exports a RecaptchaVerifier that works with our libraries (the RecaptchaVerifier class that Firebase exports does not work in React Native). Please reach out to the Expo maintainers.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants