意味着堆栈authentication – 最佳实践
我试图找出build立一个最简单的authentication系统(基于user_name和密码)的最佳做法。
我search了最佳实践,并find了一些项目,虽然他们大多数都很老,许多东西都折旧了。
我想有一些最佳做法build议有最简单的login\注册系统使用angular-express-mongodb。
你也可以看看这些文章:
- https://auth0.com/blog/2014/01/07/angularjs-authentication-with-cookies-vs-token/
- https://auth0.com/blog/2014/01/27/ten-things-you-should-know-about-tokens-and-cookies/
- http://madhatted.com/2014/6/17/authentication-for-single-page-apps
- https://scotch.io/tutorials/easy-node-authentication-setup-and-local
- http://www.frederiknakstad.com/2013/01/21/authentication-in-single-page-applications-with-angular-js/
和这些问题在计算器上:
- RESTfulauthentication
- SPAauthentication和会话pipe理的最佳实践
使用护照模块https://www.npmjs.com/package/passport ,它有许多模块可以使用,包括一个在MongoDB中存储login信息https://github.com/jaredhanson/passport-local https:// github.com/jaredhanson/passport-local/tree/master/examples
另一个看起来相当酷的select是卫星 ,一个可怕的名字,但似乎符合要求。