Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firebase auth internal error "SignUp are blocked" on web

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.

like image 847
Zed Avatar asked Oct 24 '18 13:10

Zed


People also ask

Why am I getting this error when authenticating to Firebase?

This error will only be thrown if the "One account per email address" setting is enabled in the Firebase console, under Authentication settings. Indicates the user's account is disabled. Indicates the email is already in use by another account. Indicates the email address is malformed.

How do I disable a user account in Firebase?

Next, open the Firebase console in a browser window and navigate to the Users screen of the Authentication section for the Firebase Examples project. Using the menu to the right of one of the existing user account entries, select the Disable Account menu option as outlined in Figure 12-1:

How do I enable the firebase sign-in provider?

The provided sign-in provider is disabled for your Firebase project. Enable it from the Sign-in Method section of the Firebase console. The provided phoneNumber is already in use by an existing user.

What is firebaseauthinvaliduserexception?

In the event of an authentication failure, the Firebase SDK will throw one the following types of exception: • FirebaseAuthInvalidUserException – This exception indicates a problem with the email address entered by the user. For example, the account does not exist or has been disabled in the Firebase console.


3 Answers

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.
like image 159
Marco Maccio Avatar answered Oct 16 '22 09:10

Marco Maccio


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

like image 21
Javeed Ishaq Avatar answered Oct 16 '22 09:10

Javeed Ishaq


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

like image 1
Eliseo Avatar answered Oct 16 '22 07:10

Eliseo