问题
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.
回答1:
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.
- 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
apiKey
given in the project overview of Firebase, clicked on it and went on the tab API restrictions. - There with the select box I added to the list of allowed APIs the Identity Toolkit API.
回答2:
Please use the apiKey
that doesn't forbid access to the identitytoolkit
回答3:
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
来源:https://stackoverflow.com/questions/52970822/firebase-auth-internal-error-signup-are-blocked-on-web