Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

firebase auth/operation-not-allowed [duplicate]

This is an angular web app.

Added the screenshot of the permission page

I'm trying to authenticate mobile using firebase.

In my firebase console > Authentication > signIn Method, I've enabled the phone and saved it.

But when I try to login It throws me an error saying that auth/operation-not-allowed

sendLoginCode() {
    const appVerifier = this.windowRef.recaptchaVerifier;
    const num = this.firstFormGroup.value.mobileNo
    console.log('num',num);
    firebase.auth().signInWithPhoneNumber(num, appVerifier)
      .then(result => {
             this.windowRef.confirmationResult = result;
        })
      .catch(error => console.log(error));
}
verifyLoginCode() {
    this.windowRef.confirmationResult
      .confirm(this.verificationCode)
      .then(result => {

        this.user = result.user;
        console.log('Login Successfull')

      })
      .catch(error => console.log(error, "Incorrect code entered?"));
  }

https://i.sstatic.net/jITY5.png

like image 738
Harish_Madugula Avatar asked Feb 15 '26 14:02

Harish_Madugula


1 Answers

Go to your project in firebase > authentication > Settings > SMS region policy and allow which region you want SMS to be sending OTP in line with app visibility in app store . it worked for me

like image 113
user23349956 Avatar answered Feb 17 '26 02:02

user23349956



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!