Streaming live at 10am (PST)

How to check if Username and password is correct with Firebase


#1

Hey all,

I have a database of usernames and passwords using Firebase. I am trying to check this database from a form on my webflow website. If the username and password combination are in the database on Firebase, they can continue to the specified URL.

For instance:

I have a username input field and a password input field. I need to check if these are correct (using firebase) and then send them to a URL. I know it has something to do with the "action" and the GET method, I just don't know exactly what to do.

Thanks.


#2

Would anyone know how to do this? Or a better way to get a user log in working with Webflow? Any help is greatly appreciated :smiley:


#3

@joshking518 I'm not to sure this can be done in webflow as of yet sorry (happy for someone to tell me otherwise) I know you can send data through forms to firebase, but at this point it cannot receive data back to your webflow site.

Hope this helps
D


#4

Hi @joshking518 and @daniel_cleayweb, this can be done, but you will need to use some jQuery to read the contents of the form fields when a button is clicked, and use those values with the firebase code:

https://www.firebase.com/docs/web/guide/login/password.html

So basically it goes like:

  1. user enters username and password in two text input fields.
  2. Use jQuery you can get the values of the fields, and pass those to the Firebase code
  3. If the authentication is passed, then perform an action (redirect to url)

Firebase passes the result of the authentication back to your Webflow site via the Firebase code. Alternatively, you can also use Firebase methods to enable social media login (fb, twitter etc).

I hope this helps!


#5

Wow thanks Dave, I'm always happy to be proven incorrect :raised_hands:


#7

Thanks for the reply @cyberdave, always great to hear back from you and the team. Looks like this will require some work on my part to get working, but I'm glad to see it can be done. I will get to it!

Thanks again!


#8

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