0
votes

I'm using Firebase auth with swift 4. I create a new user like this

Auth.auth().createUser(withEmail: emailTextField.text!, password: "abc123!") { (authResult, error) in
            // [START_EXCLUDE]

                guard let email = authResult?.user.email, error == nil else {
                    print(error!)
                    print("NO!!!!!!")
                    return
                }
                print("\(email) created")


            // [END_EXCLUDE]
            guard let user = authResult?.user else { return }
        }

But I get this error:


domain = usageLimits;

extendedHelp = "https://console.developers.google.com";

message = "Identity Toolkit API has not been used in project *** before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/identitytoolkit.googleapis.com/overview?project=**** then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry."; reason = accessNotConfigured;


I have enabled identity toolkit API through this link, and it still doesn't work.

I have enabled email and password sign in providers in firebase console.

I deleted firebase project and remade it, and redownloaded the googleservice.plist.

It still doesn't work. I've been hours on it!

Thanks so much,

1

1 Answers

0
votes
I have enabled identity toolkit API through this link, and it still doesn't work.

I went back to there, disabled the API, then re-enabled it, and it worked.