How to check if user enters correct password to join a chat.
This approach is propably compeletely improper. This piece of code is just to show what I want to accomplish but it isn't working at all.
val ref = FirebaseDatabase.getInstance().getReference("chats")
ref.child(chatName).child("password").equalTo(password).addListenerForSingleValueEvent(
override fun onDataChange(snapshot: DataSnapshot) {
Log.d(TAG, snapshot.toString())
// if there is data the password was right
}
....
)
How can this whole join chat with password system be done securely? What kind of rules do I have to set to the database.
Is it possible to alter firebase queries with rooted phone and see the data that is transferred between client and the server?