13
votes

I'm using Firebase Auth for a site and chosen password authentication and Google Sign In. When I ran it I got the following:

{"error":{"code":403,"message":"Requests to this API identitytoolkit method google.cloud.identitytoolkit.v1.AuthenticationService.SignUp are blocked.","errors":[{"message":"Requests to this API identitytoolkit method google.cloud.identitytoolkit.v1.AuthenticationService.SignUp are blocked.","domain":"global","reason":"forbidden"}],"status":"PERMISSION_DENIED"}}

I already enabled both password and Google Sign In from Firebase console and also enabled the Identity Toolkit API in my Google Cloud Platform console but I still get this error.

4

4 Answers

47
votes

In my case the apiKey in the environment file of Angular was allowed to only use a few Google Cloud APIs as I had restricted.

  1. I went to https://console.cloud.google.com, chose the project (same as the Firebase project of course) and then API & Services > Credentials.
  2. There in the list of API keys I looked for the same apiKey given in the project overview of Firebase, clicked on it and went on the tab API restrictions.
  3. There with the select box I added to the list of allowed APIs the Identity Toolkit API.
7
votes

As directed by @Marco Maccio

I went to https://console.cloud.google.com, chose the project

(same as the Firebase project of course)

and then API & Services > Credentials. There in the list of API keys,

I looked for the same API key given in the project overview of Firebase,

clicked on it, and went on the tab API restrictions. Therewith the select box, I added to the list of allowed APIs the Identity Toolkit API.

or make it Don't restrict key

enter image description here

enter image description here

0
votes

Please use the apiKey that doesn't forbid access to the identitytoolkit

0
votes

there is not a "API restrictions tab" in 2019, i'm really confused about this issue, looks like Identity Toolkit was deprecated :L

UPDATE:

I fond a solution, there is not a tab, is a section, I did publish my solution here: https://github.com/flutter/flutter/issues/20545