0

I am trying to implement Firebase Phone Number Authentication as described Here

However when I try try and create the RecaptchaVerifier object as per the docs:

window.recaptchaVerifier = new firebase.auth.RecaptchaVerifier('recaptcha-container');

I get the following error:

Uncaught TypeError: Cannot read property 'bind' of undefined at new FirebaseAppImpl.(anonymous function)

which seems to be from this line of code in the Firebase SDK:

 var serviceFxn = this._getService.bind(this, name);

Has anyone successfully implemented this?

1 Answer 1

2

I was wrongly trying to create the RecaptchaVerifier on the already initialised FirebaseApp rather than the actual module. This code is actually working fine:

window.recaptchaVerifier = new firebase.auth.RecaptchaVerifier('recaptcha-container');

Sign up to request clarification or add additional context in comments.

2 Comments

So what changed ? you do exactly the same thing.
Can you please elaborate it some more. Didn't get what you did?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.