错误 FirebaseError:错误(验证/参数错误)Firebase V9 Angular

Aru*_*mar 6 javascript firebase firebase-authentication angular

我正在尝试实现使用手机号码登录。

下面是我的代码,

在登录组件 HTML 中

          <a  class="btn btn-default btn-lg shadow-sm" (click)="authService.SignInwithMobileNumber(mobileNo.value)">Sign In</a>
Run Code Online (Sandbox Code Playgroud)

在 Auth Service.ts 中

  SignInwithMobileNumber(phoneNumber) {
    this.reCaptchaVerifier = new RecaptchaVerifier('recaptcha-container', {
      'size':'invisible',
      'callback': (response:any) => {},
      'expired-callback': () => {}
    }, this.auth)
    console.log(this.reCaptchaVerifier);

    return this.afAuth
      .signInWithPhoneNumber(phoneNumber, this.reCaptchaVerifier)
      .then((confirmationResult) => {
        localStorage.setItem(
          'verificationId',
          JSON.stringify(confirmationResult.verificationId)
        );
        this.ngZone.run(() => {
          this.router.navigate(['/verify']);
        });
      })
      .catch((error) => {
        console.log(error.message);
        alert(error.message);
      });
  }
Run Code Online (Sandbox Code Playgroud)

以下是我在尝试登录时遇到的错误

ERROR FirebaseError: Firebase: Error (auth/argument-error)
Run Code Online (Sandbox Code Playgroud)