Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

194
Views
Cannot read property 'RecaptchaVerifier' of undefined in Angular

I am trying to send message using signInWithPhoneNumber from firebase but I am getting following error on implementing , I also imported firebase still same issue.

import firebase from 'firebase/app';
import { environment } from 'src/environments/environment';

export class TabPage implements OnInit{
  code: string = '+91';
  spin: boolean = false;
  otpSent:boolean = false;


  recaptchaverifier;
  confirmationResult: firebase.auth.ConfirmationResult;
  phoneNumber: string;
ngOnInit(){
    this.recaptchaverifier = new firebase.auth.RecaptchaVerifier('recaptcha-container');
    this.sendOTP();
  }

sendOTP(){
    var phNo = this.code+'******';

    this.spin = true;
    firebase.auth().signInWithPhoneNumber(phNo,this.recaptchaverifier).then(result=>{
      this.phoneNumber = phNo;
      this.otpSent = true;
      this.confirmationResult = result;
      this.spin = false;
      console.log(result);
    }).catch(err=>{
      this.spin = false;
      alert(err);
    });
  }
}

Error

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You're only importing the core Firebase SDK. In order to use Firebase Authentication, you also need to import that SDK by adding:

import 'firebase/auth';
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!