Retrieving Username and Password from Firebase

Hi I'm asking for assistance in retrieving username and password from firebase. I found a post here to correctly set up my signup info how I needed it in firebase.


However, I am only able to retrieve the username. I've been trying different ways for a while but I just don't understand how to properly retrieve both username and password. Can someone tell me how to properly set my blocks please?

Change /username/ to /password/

and here:

image

you need to test the tag to see if it contains NameTextBox.txt (find this in the text blocks)

image

Are you saying to change the format this way?

@TIMAI2 when I tried it, it gave back the Incorrect username or password error

@JH1 make sure your firebase bucket is pointing to asd then simply call Firebase.GetValue and tag can be email or password...

Can you share full image of database.

Sorry, I'm very new to this, where should firebase bucket be in the blocks?
And are you referring to the set firebase project bucket to option?


This is the start of the database, all the other entries are in the same format

Automatic_Pill_Dispenser is your root bucket right?

Oh yes it is

Here is my solution; If you can't understand then please let me know I will explain.

Not quite, like this:

image

Your tag is username/pass your value is password.
You can remove the label once you have it working.


@TIMAI2 I tried it and it works!
Thank you so much.

However, I realised even when I have the correct password with incorrect username it gives the incorrect password alert instead of the incorrect username alert. Do you know why this is so?

Because your primary key is username and you are comparing password for given username it means you supposed that given username name is correct.

Second thing password can be same for two user but username can not.

Yes, I over-simplified somewhat. Try this. You will need to drag in a web component to convert firebase output to a dictionary.

image

I have tried this and it works perfectly!
thank you both @preetvadaliya and @TIMAI2 for your help!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.