sBourne sBourne - 1 year ago 287
Swift Question

Error adding Firebase users Swift

By following the information on this link, I am currently working on trying to create a user using Firebase, as shown in the code below. However, it appears no user is created when the app is run. Any input is greatly appreciated. The Firebase URL was taken from my test database.

let ref = Firebase(url: "")
ref.createUser("", password: "correcthorsebatterystaple",
withValueCompletionBlock: { error, result in
if error != nil {
// There was an error creating the account
print("error creating account")
} else {
let uid = result["uid"] as? String
print("Successfully created user account with uid: \(uid)")


The propagated error is:

Error Code: AUTHENTICATION_DISABLED) Projects created at must use the new Firebase Authentication
SDKs available from

However, as shown below, the email/password authentication is enabled in the Firebase console.
enter image description here

Answer Source

You have already authorized the email registration as I can see in your screenshot. So the problem doesnt realies on AUTHENTICATION_DISABLED.

From your error message and the snippet code I can see that you have created a new project but you are trying to use the legacy firebase SDK and so you will have compatibility issues. Also, you are looking into the old firebase documentation.

First of all you will need to make sure you have configured your project as documented in new firebase start guide.

After, you can take a look at the documentation for creating a new user with the new sdk. You can find the 3.x create user call bellow.

FIRAuth.auth()?.createUserWithEmail(email, password: password) { (user, error) in
  // ...
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download