Skip to content

Instantly share code, notes, and snippets.

@atanasovdejan
Created August 3, 2018 22:53
Show Gist options
  • Save atanasovdejan/1a1e965e4fe84291b6efd730e1c4f078 to your computer and use it in GitHub Desktop.
Save atanasovdejan/1a1e965e4fe84291b6efd730e1c4f078 to your computer and use it in GitHub Desktop.
Login on Firebase
func login(withEmail email: String, password: String, _ callback: ((Error?) -> ())? = nil){
Auth.auth().signIn(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