Authentication boilerplate based on ExpressJS, Sequelize, Passport, JsonWebToken and MariaDB
Before running the project it's mandatory to have a MariaDB server running with a schema called 'ExpressSequelizePassport'
-
Configure your environment on conf/index.js file
-
Run the following command on the root folder:
npm install
- Finally launch the server
node index.js
HTTP Method | Service | Description |
---|---|---|
POST | /basic/register | Register an account. You must pass the following parameters:
|
POST | /basic/login | Login an user and return a jwt. You must pass the following parameters:
|
GET | /auth/secure | Return a success message in case of valid authentication. You must pass an header called "auth_token" to the request |
You can download an example of Postman collection here
If you've found this project useful, please consider to donate me a coffee