This question already has answers here:
How do you include a username when storing email and password using Firebase (BaaS) in an Android app?
(3 answers)
Closed 6 years ago.
I started using Google's Firebase because, as you know, Parse is shutting down :-/
but I'm so lost in it.
I'm using registration by email / password and it is all good, but I want to add a simple username (not an email address) to this.
Could someone help me, please?
You can add the username field on the input form on your client and then, after the standard email / password authentication process is completed, use Firebase Database to store the user informations in the path /users/<uid>, adding the username and all the other fields you need.
Related
This question already has answers here:
How to get userID by user Email Firebase android?
(6 answers)
Closed 5 years ago.
I am trying to know if a user exists in Firebase (Email/Password Authentication) y only knowing the display name.
I am doing this is Android (Java).
Thank you so much!
There is no built-in support in Firebase Authentication to look up users by their display name. Given the loose definition of the meaning of the display name, it would be of limited use. Display names can't be required to be unique, since it's just a value that says how the user wants to be addressed: "When you show something from/to me, show this name next to it".
Many developers end up allowing their users to pick a username/nickname, which they then do require to be unique. If that approach make sense for your use-case too, I recommend reading some of these questions about how to accomplish this with the use of the Firebase Realtime Database:
Firebase android : make username unique
Enforcing unique usernames with Firebase simplelogin
Firebase query if child of child contains a value (a more general explanation of uniqueness in the Firebase Realtime Database)
How do you prevent duplicate user properties in Firebase?
This question already has answers here:
Firebase android : make username unique
(4 answers)
Closed 5 years ago.
The problem I can't seem to find a straight answer to is how can I do a query on this list in the Firebase database by some field (a username in my case) to find the associated key for that user given that username is guaranteed to be a unique value.
I've read through the documentation on queries, but it looks like all of them need a key in some shape or form is that really the case? And if it is how is this normally avoided?
Thanks a million below is how my DB is designed.
Right now, in my database there is a list of user objects:
Database
-users
-{SomeUniqueKey}
-data: "some data"
-username: "user1"
-usernameThisUserIsFollowing: "user2"
+{SomeOtherUniqueKey}
You may use equalTo.
Reference: https://firebase.google.com/docs/database/
This question already has answers here:
How do I return a list of users if I use the Firebase simple username & password authentication
(7 answers)
Closed 6 years ago.
I am storing user's display name in Firebase Auth. Fetching from Firebase Auth is simple when the same user is logged in. But, when another user is logged in, how do I fetch an account's display name when I have their unique UID (User ID).
One solution is when you register a user add his details in database also
Example
Once you are under createUserWithEmailandPassword()
DatabaseReference db=FirebaseDatabase.getInstance().getReference();
DatabaseReference users = db.child("Users").child(mAuth.getCurrentUser().getUid());
users.child("Name").setValue("<NAME>");
Now when the user signs into your database retrieve the Name from the database from child Users
You can't get the name, or any other details of a user that is not currently signed in using FirebaseAuth.
Instead, you must create a node in your database where you store the name, and any other necessary details by querying the database.
I'm really curious to know how you have the UID of any other user without doing this.
This question already has answers here:
How do I return a list of users if I use the Firebase simple username & password authentication
(7 answers)
Closed 5 years ago.
How can I retrieve the list of users from Firebase Authentication? I can get the 'current' user but that's it. Or do I have to add users to database first and get the list from there?
If you have a nodejs project, use the firebase auth:export to export users from Firebase Auth. Users can be exported in csv or json format:
firebase auth:export users.json --format=json --project projectname
It's not possible to retrieve a list of users from Firebase Authentication.
The explanation is in this thread
The only way to do that is to save the user to the database once they are registered.
This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
Facebook Graph API and friend's email
I know it is not possible to retrieve friends email addresses but is there any alternative to do it? What i have found out is that a URL like: www.facebook.com/username/info is able to retrieve an HTML page which may or may not contain email addresses. Can we parse through html and then get the data like this?
Scraping isn't really related to Graph API, and while you can do it, this is something no one would recommend (and easily may turn into Platform Policy violation).
BTW, Currently in the source of page there is email address of user in url encoded form in an html comment block. (every DOM parser is automatically out of scope), and no one can ensure it will be there. Since changes on Facebook platform are way frequent, this will probably change soon and you'll be in a constant nightmare of figuring what changed and fixing parser...
Actually for communication with your friends via application you should use social channels defined by Facebook. You may also be interested in Chat API if you want to send messages to friends.