0
votes

Currently I have my app making user profiles and generating an autoID to my database using the following:

databaseRef.child("users").childByAutoId().setValue(user)

Instead of using .childByAutoID, I'd like that to be the User UID that's generated using the Firebase User UID value, however I'm not sure how to swap that into my code above.

1

1 Answers

2
votes
databaseRef.child("users").child(FIRAuth.auth()!.currentUser!.uid).setValue(user)