-
-
Save zontan/5b0ff9e3b3e442d06609bb3e2d0f26fd to your computer and use it in GitHub Desktop.
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 authUI(_ authUI: FUIAuth, didSignInWith authDataResult: AuthDataResult?, error: Error?) { | |
if let error = error { | |
print(error.localizedDescription) | |
} else { | |
//Save the user to our list of users. | |
if let user = authDataResult?.user { | |
let ref = Database.database().reference() | |
ref.child("users").child(user.uid).setValue(["username" : user.displayName?.lowercased(), | |
"displayname" : user.displayName, | |
"email": user.email]) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment