1.3.4 • Published 6 years ago
tasowlogin v1.3.4
TasowLogin API
Hey! Are you tired of setting up login portals? Well, we got the solution! Let your clients login with Tasow Accounts!
API :
Set up :
1 First you need to install it via npm
$ npm i -g npm
$ npm i --save tasowlogin2 add this in your script
const tasowlogin = require("tasowlogin");
// Here your express import stuff
app.use(tasowlogin(callback_function));3 Make a callback function :
function callback_function (req, res, token) {
console.log(token);// You can use this token to get info of the user
}4 Get the info of the user :
tasowlogin.info("yourtoken", (info) => {
console.log(info)// Get the info of the token
})returns a JSON with info :
id (a random id that is used in the Tasow DB)
fullname (the fullname of the user)
mail-adress (the e-mail of the user)
username (the username of the user)
age (the age of the user).5 When you want a user to login :
tasowlogin.login(req, res);6 Enjoy!
All functions :
---- command --------------------- description ----------------------
| tasowlogin | the main function is for app.use, this is crucial!!! |
---------------------------------------------------------------------
| .info | Gets the users info |
---------------------------------------------------------------------
| .login | Run this command when you want a user to login. |
---------------------------------------------------------------------Examples of commands :
Coming soon...
1.3.4
6 years ago
1.3.3
6 years ago
1.3.2
6 years ago
1.3.1
6 years ago
1.3.0
6 years ago
1.2.62
6 years ago
1.2.0
6 years ago
1.2.6
6 years ago
1.2.5
6 years ago
1.2.4
6 years ago
1.2.3
6 years ago
1.2.2
6 years ago
1.2.1
6 years ago
1.2.61
6 years ago
1.1.9
6 years ago
1.1.8
6 years ago
1.1.7
6 years ago
1.1.6
6 years ago
1.1.1
6 years ago
1.1.0
6 years ago
1.1.5
6 years ago
1.1.4
6 years ago
1.1.3
6 years ago
1.1.2
6 years ago
1.0.9
6 years ago
1.0.8
6 years ago
1.0.7
6 years ago
1.0.6
6 years ago
1.0.5
6 years ago
1.0.4
6 years ago
1.0.3
6 years ago
1.0.2
6 years ago
1.0.1
6 years ago
1.0.0
6 years ago