DEV Community

Mahesh K
Mahesh K

Posted on

[Advice] Options to Handle Users in Node Express User dashboard instead of Okta or Auth0 3rd Party Service

I am trying to build user login and dashboard with following.

  1. Node
  2. Express server
  3. 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.

Discussion (4)

Collapse
jrking365 profile image
Jean Roger Nigoumi Guiala

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.

Collapse
philnash profile image
Phil Nash

Just popping by to say that sha and md5 are not secure hashing algorithms for passwords. Check out bcrypt or PBKDF2 instead.

Collapse
stephenafamo profile image
Stephen Afam-Osemene

Try the package Passport.js

passportjs.org/

Collapse
hugo__df profile image
Hugo Di Francesco

"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.