1.3.4 • Published 5 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 tasowlogin
2 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
5 years ago
1.3.3
5 years ago
1.3.2
5 years ago
1.3.1
5 years ago
1.3.0
5 years ago
1.2.62
5 years ago
1.2.0
5 years ago
1.2.6
5 years ago
1.2.5
5 years ago
1.2.4
5 years ago
1.2.3
5 years ago
1.2.2
5 years ago
1.2.1
5 years ago
1.2.61
5 years ago
1.1.9
5 years ago
1.1.8
5 years ago
1.1.7
5 years ago
1.1.6
5 years ago
1.1.1
5 years ago
1.1.0
5 years ago
1.1.5
5 years ago
1.1.4
5 years ago
1.1.3
5 years ago
1.1.2
5 years ago
1.0.9
5 years ago
1.0.8
5 years ago
1.0.7
5 years ago
1.0.6
5 years ago
1.0.5
5 years ago
1.0.4
5 years ago
1.0.3
5 years ago
1.0.2
5 years ago
1.0.1
5 years ago
1.0.0
5 years ago