【问题标题】:AngularFire 2.0.1 $createUserWithEmailAndPassword auth/invalid-api-keyAngularFire 2.0.1 $createUserWithEmailAndPassword auth/invalid-api-key
【发布时间】:2016-07-01 09:09:54
【问题描述】:

我正在尝试使用以下方法从 AngularFire 2.0.1 (Firebase 3.0.5) 创建一个 Firebase 用户:

$createUserWithEmailAndPassword(email, password)

api返回错误:

{"code":"auth/invalid-api-key",
  "message":"Your API key is invalid, please check you have copied it correctly."}

应用的配置如下所示:

{apiKey: "my_verified_key", 
 authDomain: "my_verified_project_id.firebaseapp.com", 
 databaseURL: "https://my_verified_project_id.firebaseio.com/"}

其中 my_verified_key 是在

找到的数据库机密

https://console.firebase.google.com/project/my_app/settings/database

my_verified_project_id 是在

找到的 ProjectId

https://console.firebase.google.com/iam-admin/settings/project?project=my_verified_project_id&consoleReturnUrl=https:%2F%2Fconsole.firebase.google.com%2Fproject%2Fmy_verified_project_id%2Fsettings%2Fgeneral%2F

在网络日志中,我看到错误来自 POST 到

https://www.googleapis.com/identitytoolkit/v3/relyingparty/signupNewUser?key=my_verified_key

我已检查是否为我的应用启用了身份工具包 API。

我已尝试按照其他地方的建议在 Firebase 控制面板中禁用/启用电子邮件/密码身份验证。

我尝试从节点库创建用户,但似乎大多数身份验证功能都没有在那里实现。

【问题讨论】:

    标签: angularfire firebase-authentication


    【解决方案1】:

    确保您获得了正确的 API 密钥。转到 firebase 控制台页面: https://firebase.corp.google.com/project//认证/用户 点击右上角的WEB SETUP: 提供的 sn-p 将包含自动生成的 api 密钥供您使用。

    【讨论】:

    猜你喜欢
    • 2022-01-14
    • 2022-07-02
    • 1970-01-01
    • 2021-05-19
    • 2021-11-21
    • 2023-02-07
    • 2020-05-19
    • 1970-01-01
    • 2021-10-29
    相关资源
    最近更新 更多