I am trying to build user login and dashboard with following.
- Node
- Express server
- MySQL
I don't want to use okta or Auth0 for user registration and dashboard management.
So what are some of the good places to learn Node (express server) and MySql user registration and management?
I don't want to use MongoDB and NoSQL.
I don't want to use OpenID and Social logins.
So what are some of the pointers on the web to check out.
Any github repository with project that does this would be helpful.
Top comments (4)
you can try this tutorial on medium : here.
I will advice that you used some secure hash algorithms (sha256,md5 ...) for the passwords you store and access to on your database. If you are planning to build a wide project you could consider using Sequelize as Hugo said but if it's just a little login page, go for a simple light project.
Just popping by to say that sha and md5 are not secure hashing algorithms for passwords. Check out bcrypt or PBKDF2 instead.
Try the package Passport.js
passportjs.org/
"Add user authentication" is sort of "build a webapp 101" in most backend framework's (Django, Rails, Laravel etc), except there aren't that many resources around that for Node since the most widely adopted frameworks are pretty much just routers.
You could roll your own Auth with a couple of tables (user table, sessions table), using bcrypt to hash/salt the passwords (unnecessary if you only do social logins), I personally use sequelize as an ORM but that's not required.
Or as Stephen said, use passport.js, haven't used it personally but it seems like the goto in the Node community.