Connect login and register form in firebase

"while user SignUp you can use their email as a tag and password as a value. now whenever someone login to your app you have to just check that this tag means email is available or not if yes then you have to check that email password is same of not if yes... then open another screen"

i maked when user register and gmail ,password sent to firebase but i dont know who can i connect them ( i dont know how can i make their blocks) as the the explanation above

can you make it?

1 Like

You cannot do this. Firebase (realtime database) will not allow some special characters to be used as tags, which for an email address means the @.

1 Like

so if user registered and their email and password in firebase
how can call their ( where user sign in and write their email and password)..
can you make general blocks to do that/

1 Like

I am sorry, I do not understand what you mean.

This may help:

When a user registers Firebase creates a UID for that user. Create a tag called users and set each user as their UID, with their email and password as values. The tag users should only be readable by you, the Admin. You can then collect their login details at will.

2 Likes

After the user registers the information (email, password), it will go to my database in firebase
i did their block but i dont know how can i connect login form with firebase
when user writes email and password in loginform how can i call it from firebase and compare it
i want to make it for me

1 Like

call user database
compare them
if right it will open a new screen
how

1 Like

You do not need to. When a user signs into Firebase (having registered successfully), if they provide the correct email and password they will be signed in.

Can I refer you back to my guide which shows how this works and how you can use it:

If you use a Firebase Authentication extension, much the same approach is applied.

For both methods, user signs in, if successful, a response with their idToken and other profile data is returned.

[edit] use the above returned data with the logic in your app to switch screens etc.

3 Likes

i need to do the same but i have one problem , i want to store this data in firebase (realtime database) and in this block There is no such * Registration & Login with Firebase Authentication

1 Like
  1. It would be unwise to store password/personal information in plain text. However:
  2. As previously advised, you would need to setup a users node with read-false (except for admin users) / write-true rules, so that when a user logs in, a dataset from their profile can be stored against their uid. You would need to read up on the REST API and Firebase Rules in order to implement this. In my Reg & Login guide, this work would need to go in the section global action = user in Web1.GotText.
  3. Why would you need to store this data again?
2 Likes

1 -As an app maker, don't I have the right to see the data after stored
2- if i want to make a button when user forget his password , dont i need them with me in firedatabase?

1 Like

@moemen according to you the data is storing successfully and you need to call that data and compare the tag and value so you can do like this

  1. Call tag list (it will call all the tags in the form of a list)

  2. When got tag list then
    if (is in list, thing emailtextbook.text, list get value) {
    Call get value from firebase tag = emailtextbook.text
    }

  3. When got value {
    if (password.text == get value){
    Go to other screen
    }
    }

I have written it in simple language to make it understandable else I would have written it in java code
I'll provide you the example blocks soon till then try this method and later you will also get the blocks
Hope this might help you if not message me personally I'll help you surely

Off Topic

Actually I have made a fully functioning chat app and there is was using this kind of login system.
That's why I know this all :sweat_smile::sweat_smile:

Thank You
Horizon

3 Likes

Thank you and yeah if you can do it as block, i I will be thankful for you

1 Like

OK I'll do it but wait for sometime

Thank you

2 Likes

Thank you so much :heart:

1 Like

Your most welcome

2 Likes

You have the right to look after your users privacy....
Firebase does not present an authenticated user's password anywhere, you would have to get it from the app

Firebase REST API provides a routine for this:
https://firebase.google.com/docs/reference/rest/auth#section-send-password-reset-email

However, if you want to try something different, this may be more to your liking and provide you with more control:

2 Likes


Do they have to be empty? or which no?

1 Like

Read the guide, it tells you want is required.

1 Like

"You will also need three more variables with an empty text: idToken, currentUser, and signType "

so
passwd , uid , projectbucket from where can i take them

1 Like

Please read the guide from the beginning! When you setup your project and your authenticated user, these items are available in the firebase console.

1 Like