What is the best way to create simple auth using firebase?

I read the firebase tutorial, but frankly it doesn't make sense yet, sorry for that =)

I want to implement simple authentication, just my username and password, that the credentials are in a node in my firebase structure (I do not want to use Facebook, email / passing or something like that)

What is a good way to do this using?

+4
source share
2 answers

Firebase clients authenticate using a secure token called JWT. This JWT must be generated by a trusted server somewhere (it cannot be generated on your clients, or we could not verify its authenticity).

If you want to specifically authenticate with a username (and not email) and a password, and you want to save authentication credentials (for example, a hashed password), you can do it in Firebase, but you will need a server somewhere to compare the password, which someone logs into your application with this hashed password, and then generate a custom JWT token. See Docs here: https://www.firebase.com/docs/security/custom-login.html

So that developers do not run the server code for this usual case, we provide the Firebase Simple Login service, which will generate these tokens for you. It works for email / password, Facebook, Twitter and some other common login types. Here you can see the documentation. https://www.firebase.com/docs/security/simple-login-overview.html

+6
source

You can try this question, similar to AngularJS and Firebase Authentication or this Firebase auth tutorial, which looks pretty straight forward. Textbook

If you're still unlucky, I suggest posting some code showing how far you got, and I will see what I can do to help.

0
source

All Articles