android - How to get authenticated users from firebase database? -
i'm creating app using firebase messaging service. messaging working fine, wish make happen between 2 users.
i believe need provide authentication each user search connections(their friends via social network connections or mail ids).
i managed create google+ authentication in app using auth.google_sign_in_api , appinvite.api, connecting other users in firebase had no clue, went through these links udacity tutorial , codelabs tutorial , firebase guides. (the tutorials explained same thing , every 1 authenticated using email provider, , not via google+ signin. , matter fact when tried google+ signin via these procedures, didnt work, email provider working.)
anyways email provider me of still don't have clue how connect 2 users thriugh firebase. connected 2 users, showing in firebase authentication console how connect 2 user 1 one?
any clues??
to make connection between 2 users in social network, typically 1 of them has enter "secret" details other user. common have enter email address of friend , system show has record matching email address.
you implement such system on firebase having list of email addresses corresponding uid:
userlookup "ari@stackoverflow,com": "uidofari" "puf@stackoverflow.com": "uidofpuf"
now when type email address, can find uid (and connect you).
to secure above, you'd grant read access on specific users:
{ "rules": { "userlookup": { "$user": { ".read": true } } } }
with structure can read each specific user, cannot search list of users. can find uid
(and connect) if know complete email address.
Comments
Post a Comment