-
-
Save zontan/dbcf010b385eafb999d51c219a407381 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