Skip to content

Instantly share code, notes, and snippets.

@atanasovdejan
Created August 3, 2018 22:34
Show Gist options
  • Save atanasovdejan/6240831cdbd241e7c9ef5afb379b474b to your computer and use it in GitHub Desktop.
Save atanasovdejan/6240831cdbd241e7c9ef5afb379b474b to your computer and use it in GitHub Desktop.
Create user with Firebase Authentication
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