This is my real rime database.
This is the code i used to create db.
const db = firebase.database()
const frRef = db.ref('Foreign/' + UserId);
frRef.set({
});
});
` this is the rules i applied here.
"foreign": {
".indexOn": ["UserId"],
"$UserId": {
".read": "auth.UserId == $UserId",
".write": "auth.UserId == $UserId"
} },
But i got the error "permission denied." any wrong with the implementation. i want only the users with these userids like 99663384, needs to read and write data only . any help would be appreciated. Thank you.