flutter - 无法在flutter中使用firebase auth使用电子邮件和密码登录或注册
问题描述
我正在使用带有电子邮件和密码的颤振 firebase 身份验证。当我登录或注册时,我收到以下错误:
发生内部错误。[ 对此 API 身份工具包方法 google.cloud.identitytoolkit.v1.AuthenticationService.SignInWithPassword 的请求被阻止。]
我正在使用 firebase_auth:^0.8.4+2。我已经从我的 firebase 控制台启用了使用电子邮件和密码进行注册。
解决方案
在我的情况下,Angular 环境文件中的 apiKey 只允许使用我限制的几个 Google Cloud API。
我去了https://console.cloud.google.com,选择了项目
(same as the Firebase project of course)
然后是 API & Services > Credentials。在 API 密钥列表中,我查找了 Firebase 项目概述中给出的相同 API 密钥,单击它,然后进入选项卡 API 限制。通过选择框,我将 Identity Toolkit API 添加到允许的 API 列表中。
或使其不限制密钥
推荐阅读
- c# - SQL 如何替换一个值
- python - 使用 python 和请求,如何进行正确的 POST 调用以及在哪里找到标头?
- android - FirebaseAppDistribution:appDistributionUpload gradle 命令中缺少应用程序 ID
- mysql - 跨列和行计算值的实例
- javascript - 使用 redux 钩子时使用 redux 操作的最佳选择是什么?
- sql - Impala 2.11:AnalysisException:选择列表中不支持子查询
- swift - 在 SwiftUI 中获取当前的经纬度
- c++ - 是否可以禁止一个类被动态转换为?
- git - Git - 将发布分支合并到主分支
- tensorflow - 任何想法如何解决激活函数的问题?