1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

Firebase signInWithPhoneNumber is not sending otp to the number

Discussão em 'Angular' iniciado por Javed Shahzad, Julho 14, 2025.

  1. We have ionic angular app and firebase signInWithPhoneNumber was working good before. but now suddenly its stopped working. always giving internal server error. Seince we are on Blaze plan and billing is enabled. and domain is also added in the domain list. we have searched also but no success. also we have enabled phone auth. also added the country to allow list.

    please let us know about the issue.

    we are getting below error

    {"error":{"code":500,"message":"Internal error encountered.","errors":[{"message":"Internal error encountered.","domain":"global","reason":"backendError"}],"status":"INTERNAL"}}

    makeCaptcha() {
    const component = this;
    this.recaptchaVerifier = new firebase.auth.RecaptchaVerifier('recaptcha-container', {
    'size': 'invisible',
    'callback': (response) => {
    console.log(response);
    component.captchanotvarified = true;
    }
    });
    this.recaptchaVerifier.render();
    }

    sendOtpBrowser(phone) {
    const component = this;
    this.uiElementService.presentLoading('Sending otp');
    this.makeCaptcha();
    firebase.auth().signInWithPhoneNumber(phone, this.recaptchaVerifier)
    .then((confirmationResult) => {
    console.log('otp_send_success', confirmationResult);
    component.result = confirmationResult;
    component.uiElementService.dismissLoading();
    component.uiElementService.presentToast('OTP Sent');
    if (component.isDemoNumber === 'true') {
    component.otp = component.config.demoLoginCredentials.otp;
    component.verify();
    }
    component.otpNotSent = false;
    if (component.intervalCalled) {
    clearInterval(component.timer);
    }
    component.createInterval();
    })
    .catch((error) => {
    console.log('otp_send_fail', error);
    component.resendCode = true;
    component.uiElementService.dismissLoading();
    component.uiElementService.presentToast(error.message || 'OTP Sending failed');
    });
    }

    Continue reading...

Compartilhe esta Página