sf_auth_server

1.1.4 • Public • Published

sf_auth_server

Install

Install with Npm

$ npm install sf_auth_server

Versions

Current Version

1.1.4

Usage

Import pakage

var Express = require('express');
var app = Express();
var Auth require('sf_auth_server');
var config_db= {
	username: 'localhost',
    password: '****',
    database: 'authentication',
    host: '0.0.0.0',
    dialect: 'mysql',
    define: {
        timestamps: false
    },
    logging: false
};
var table_db = "autho_user"; //Table's name 
var au = new Auth(app,config_db,table_db);

Feature in this version

Create two api for authentication

  • 'Login'
	POST: '/api/login'
  • 'Signup'
	POST: '/api/signup'

Note: service'll return a object: result = { isSuccess, token, type }

  • 'GetProfile'
	GET: '/api/getProfileByToken'

Note: service'll return a object: result = { isSuccess, id, username }

Readme

Keywords

none

Package Sidebar

Install

npm i sf_auth_server

Weekly Downloads

1

Version

1.1.4

License

ISC

Last publish

Collaborators

  • hdlinhit95