Created
August 3, 2018 22:34
-
-
Save atanasovdejan/6240831cdbd241e7c9ef5afb379b474b to your computer and use it in GitHub Desktop.
Create user with Firebase Authentication
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func createUser(email: String, password: String, _ callback: ((Error?) -> ())? = nil){ | |
Auth.auth().createUser(withEmail: email, password: password) { (user, error) in | |
if let e = error{ | |
callback?(e) | |
return | |
} | |
callback?(nil) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment