How to get authenticated users from firebase database?

I am creating an application in which I will use the Firebase messaging service. Messages are working fine, but now I want this to happen between two users.

I believe that I need to provide authentication for each user, and then search for their connections (their friends through their social networks or their mail IDs).

I managed to create Google+ authentication in my application using Auth.GOOGLE_SIGN_IN_API and AppInvite.API, but connecting to other users in firebase made no sense, then I looked through these links for the Udacity Tutorial and Codec Tutorial and Firebase Guide . (The tutorials explained the same thing, and each one authenticated using an email provider, not a Google+ subscription. And in fact, when I initially tried Google+ subscription using these procedures, it did not work, but the email provider mail works.)

Anyways an email provider is also good for me at the moment, but still has no idea how to connect two Thryugh Firebase users. I connected two users, showing them in my Firebase authentication console, but how to connect two users one to one?

Any hints

0
source share
1 answer

, "" . , , , , .

​​ Firebase, uid:

userLookup
  "ari@stackoverflow,com": "uidOfAri"
  "puf@stackoverflow.com": "uidOfPuf"

, , UID (, , ).

, :

{
  "rules": {
    "userLookup": {
      "$user": {
        ".read": true
      }
    }
  }
}

, . uid (, , ), .

+1

Source: https://habr.com/ru/post/1014115/


All Articles