Hi I have a list of users in my fb database. The user id is auto-generated after successful registration and each user entry has the name, email, and uid. Also, each of these properties is being indexed in /index so that I can easily look up a user's id given their uid.
According to the docs, firebase says to use write: $user_id === auth.uid
How can I accomplish this using the generated ID instead of the uid?
here's the fb db: https://medviz.firebaseio.com/
In Your users object there will be users like this
you will have many
unique key/user nodesin users object, eguser1234abc,user2434dbccThat unique key can be named any
variablein rules it not necessary to call it$user_id, you can call it anything you want for example you can name the variable as$any_variablefor unique user keysand in auth.id whenever user successfully authenticate that same unique id is in
auth.uidso you can any where math thatauth.uidwhen you are editing the info related to that userFor example if
auth.uidcontainsuser1234abcand ifuser1234abcis editing this objectuser1234abc:{name: "abc" }thn accordind to .write rule he will be able toSee the updated view below
Updated Visual Hierarchy: