Skip to content

Instantly share code, notes, and snippets.

@nderkach
Created December 3, 2017 15:18
Show Gist options
  • Save nderkach/16be0383d8a81723ad37c1c7487f4c2c to your computer and use it in GitHub Desktop.
Save nderkach/16be0383d8a81723ad37c1c7487f4c2c to your computer and use it in GitHub Desktop.
// get realtime database pointer
let ref = Database.database().reference()
// get currently authenticated user
guard let currentUser = Auth.auth().currentUser else {
return
}
// store any data at a given path
ref.child("users/\(currentUser.uid)/twitter/token").setValue(authToken)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment