Created
August 3, 2018 22:53
-
-
Save atanasovdejan/1a1e965e4fe84291b6efd730e1c4f078 to your computer and use it in GitHub Desktop.
Login on Firebase
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 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