问题
My android app has a string ,and i want to send it to the Firebase database for authentication.If that string matches "jhgkjgl",i want Firebase to send me the data ,otherwise not send anything.
What do i have to write both in my java and firebase console? What do i need to do?
rules:
{
"rules":{
".read":"auth.uid.matches(/jhgkjgl/)"
}
}
The data i want to get in my app :
q:"qqqweryty"
My path is:
https://fir-rial-8888.firebaseio.com/
I just want to use the string for authentication.If the string in my app matches that of server's ,i want to get the value of my key "q".
回答1:
what if you try something like ..
".read":"newData.val() == 'jhgkjgl'"
来源:https://stackoverflow.com/questions/39141727/getting-value-from-firebase-database-by-authentication