Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

201
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda