这是一个有角度的网络应用程序。
新增权限页面截图
我正在尝试使用 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)
