Har*_*ula 12 javascript firebase firebase-authentication
这是一个有角度的网络应用程序。
新增权限页面截图
我正在尝试使用 firebase 验证移动设备。
在我的 firebase 控制台 > 身份验证 > 登录方法中,我已启用手机并保存它。
但是当我尝试登录时它会抛出一个错误说
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?"));
}
Run Code Online (Sandbox Code Playgroud)

Mis*_*ses 24
您似乎尚未在 Firebase 控制台中启用 Google 登录方法。要解决该问题,请执行以下操作:
您可能必须配置一个安全项目 ID(您将在启用按钮下方看到一个下拉列表)。您需要做的是,输入项目中的 android 和/或 ios 客户端 ID,然后点击“保存”。这将告诉 firebase 处理该客户端的登录操作是安全的。
为了能够使用电话登录方法,您需要激活付费计划。
答案原作者:/sf/answers/4591865631/
| 归档时间: |
|
| 查看次数: |
28129 次 |
| 最近记录: |