There is really no schema. You write the values to the hierarchy you need. First you refer to the UID.
In Swift, it will be:
var usersRef = ref.childByAppendingPath("users")
, . , .
let newUser = [
"provider": authData.provider,
"displayName": authData.providerData["displayName"] as? NSString as? String
]
:
ref.childByAppendingPath("users")
.childByAppendingPath(authData.uid).setValue(newUser)
. https://www.firebase.com/docs/ios/guide/user-auth.html
:
{
"users": {
"6d914336-d254-4fdb-8520-68b740e047e4": {
"displayName": "alanisawesome",
"provider": "password"
},
"002a448c-30c0-4b87-a16b-f70dfebe3386": {
"displayName": "gracehop",
"provider": "password"
}
}
}
, !