Skip to content

adslaton/authenticate

Repository files navigation

Authenticate

A basic authentication service built with:

Setup

  • Define environment variables to be used in the configuration file (config.js)
module.exports = {
    email: process.env.EMAIL || false,
    mongo: process.env.MONGO_URL,
    port: process.env.PORT || 5800,
    sendMail: {
        from: '',
        subject: ''
    }
};

Assumptions

  • If email is enabled, it is assumed that smpt is listening on port 25

API

Login

  • path /login
  • method POST
  • data {username: [username], password: [password]}

Login out

  • path /logout
  • method POST
  • data {username: [username]}

Register

  • path /register
  • method POST
  • data {username: [username], password: [password]}

Pasword Reset

  • path /reset
  • method POST
  • data {username: [username]}

About

Basic user auth service

Resources

Stars

Watchers

Forks

Packages

No packages published