Issue
I was using firebase mobile authenication in web application, when I use recaptchaVerifier, when the recaptchaVerifier is not shown and given this error, I am aready using realtime database in the project that working fine but dont know why at mobile authenitcation module is not working app.module.ts
import { environment } from './../environments/environment';
imports: [ AngularFireModule.initializeApp(environment.firebaseConfig)]
component.module.ts
ngOnInit() {
this.windowRef = this.win.windowRef
this.windowRef.recaptchaVerifier = new firebase.auth.RecaptchaVerifier('recaptcha-container')
this.windowRef.recaptchaVerifier.render()
Please help me to sortout this!
Solution
You need to Initialize the firebase instance with the initializeApp method
In the Component's ngOnInit() function add the following line before you create the RecaptchaVerifier.
firebase.initializeApp(config);
this.windowRef.recaptchaVerifier.render()
Answered By - Sajeetharan

0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.