getting value from firebase database by authentication

纵然是瞬间 提交于 2019-12-04 05:48:21

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!