Skip to content

antoniopol06/authentication-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AUTHENTICATION-API

Module to reuse authentication part. If you are bored to code authentication part on your side project this module is for you!

RUN SAMPLE

  1. Clone this repo

  2. Install dependencies:

npm install

  1. Run the following command:

npm run sample

  1. localhost:3000/ is ready to do requests (use your favourite API development environment as CURL, POSTMAN or whatever you want)

HOW TO USE IN YOUR PROJECT?

  1. Install authentication-api:

npm install authentication-api

  1. Import module
var authApi = require('authentication-api');
  1. Set authentication-api routes on your express routes:
app.use('/*', authApi.router);

Routes that were generated:

Method url data description
POST /signup {email: ..., password: ...} create user
POST /login {email: ..., password: ...} check email/password are correct and return token

TODO

  • [] Testing
  • [] Create middleware to check user is logged
  • [] Reset password
  • [] Accept other databases (MySql, PostgreSQL)

license

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published