android - “错误:给定的登录提供程序已为 Firebase 项目禁用。” 但我启用了 firebase google auth
问题描述
我正在将 ionic 3 用于 android 应用程序,但在谷歌加上使用 firebase 登录时出错。集成 ionic 和 cordova g+ 插件,我的代码是
gPlusLogin(){
this.nativeGLogin();
}
async nativeGLogin(){
try {
const gplusUser = await this.googlePlus.login({
'webClientId': '235*********ie.apps.googleusercontent.com',
'offline': true
})
return await this.afAuth.auth.signInWithCredential(firebase.auth.GithubAuthProvider.credential(gplusUser.idToken))
} catch (error) {
this.errorAlert(error)
}
}
解决方案
当您打算使用 Google 登录时,您正在使用GithubAuthProvider
您的,这可能是问题所在。signInWithCredential
推荐阅读
- ios - 如何将 Swift 中的 Double 编码为 JSON 作为带小数点的数字?
- javascript - JavaScript 中的 while 循环递减,直到达到 0 并打印“Blastoff”
- javascript - 使用 Alpine JS 将鼠标悬停在下拉菜单上
- python - 为节点分配颜色时出现 KeyError
- reactjs - 带有 InnerBlocks 模板的 WordPress 块转换
- python - 不可读的智能感知工具提示
- python - 如何在 bert 模型上添加 Bi-LSTM 层?
- reactjs - 当我在反应中更改范围滑块时,为什么整个页面会重新渲染?
- curity - 由于许可问题,无法在 Curity 中创建数据源
- polymorphism - OCaml 中的多态类型