最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - What is the best way to create a simple auth using firebase? - Stack Overflow

programmeradmin2浏览0评论

I've read the firebase tutorial but frankly this is not make sense yet, sorry about that =)

I wanna to implement a simple auth, just my username and password, that the credentials are in a node in my firebase structure (I don't wanna auth using Facebook, Email/Pass or some like that)

What is the good way to do this using?

I've read the firebase tutorial but frankly this is not make sense yet, sorry about that =)

I wanna to implement a simple auth, just my username and password, that the credentials are in a node in my firebase structure (I don't wanna auth using Facebook, Email/Pass or some like that)

What is the good way to do this using?

Share Improve this question edited Mar 4, 2013 at 6:34 Barnee 3,3998 gold badges45 silver badges56 bronze badges asked Mar 4, 2013 at 6:19 Tulio CruzTulio Cruz 591 silver badge7 bronze badges 1
  • engineering.letsnurture./firebase-basic-authentication – Chintan Soni Commented Jul 4, 2016 at 8:42
Add a ment  | 

2 Answers 2

Reset to default 6

Firebase clients are authenticated using a secure token called a JWT. This JWT must be generated by a trusted server somewhere (it cannot be generated on your clients, or we couldn't verify that it's authenticate).

If you want specifically to authenticate with a username (not email) and password, and you want to store the authentication credentials (a hashed password for instance), in Firebase, you can do that but you'll need a server somewhere to pare the password someone enters in your app with that hashed password and then generate a custom JWT token. See the docs here: https://www.firebase./docs/security/custom-login.html

To avoid making developers run server code for this mon case, we provide a service called Firebase Simple Login that will generate these tokens for you. It works for Email/Password, Facebook, Twitter, and some other mon login types. You can see documentation here. https://www.firebase./docs/security/simple-login-overview.html

You could try this question which is similiar AngularJS and Firebase Authentication or this Tutorial on Firebase auth which looks fairly straight forward.Tutorial

If you still have no luck, I suggest posting some code showing how far you have got and I will see what I can do to help.

发布评论

评论列表(0)

  1. 暂无评论