1.1.1 • Published 7 years ago
sf_authentication_server v1.1.1
sf_authentication_server
React component, pure function
Install
Install with Npm
$ npm install sf_authentication_server
Versions
Current Version
1.0.6
Usage
Import pakage
var Express = require('express');
var app = Express();
var Auth require('sf_authentication_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";
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'