0.0.41 • Published 6 years ago

authentication-api v0.0.41

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

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

  3. Run the following command:

    npm run sample

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

  2. Import module

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

Routes that were generated:

Methodurldatadescription
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

0.0.41

6 years ago

0.0.4

6 years ago

0.0.361

6 years ago

0.0.360

6 years ago

0.0.35

6 years ago

0.0.33

6 years ago

0.0.32

6 years ago

0.0.31

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago