Skip to content
Back to all work

Express authentication system

Sign-up, login and protected routes for a Node.js app, using JSON Web Tokens and hashed passwords on MongoDB.

Type
API
Status
Open source
Built with
Node.js, Express, MongoDB, Mongoose, JWT, bcrypt
Links
View the code

What it is

The login layer most web apps need: user registration and login, passwords hashed with bcrypt, JWT tokens issued on login, and middleware that protects private routes.

Endpoints

  • POST /api/auth/register creates an account
  • POST /api/auth/login returns a token
  • GET /api/users/me returns the signed-in user, for valid tokens only

Tell me what is slowing you down

Describe your business, or your client's, and the problem you want solved. I'll reply within one working day with how I would approach it and a fixed price to start.