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