1.0.8 • Published 4 years ago
fielo-auth-x v1.0.8
Installation
This is a Node.js module available through the npm registry. Before installing, download and install Node.js. Node.js 0.10 or higher is required.
Installation is done using the npm install command:
$ npm install fielo-auth-x
Example
const fielo_auth = require('fielo-auth-x');
//Set your public key for the access
const x_api_key = '[YOUR_KEY_ACESS]';
//Get authorize application
let $auth = async () => await fielo_auth.auth_app(x_api_key);
$auth().then(async (auth)=>{
//Get authentication for user/member
let $user = await fielo_auth.auth({
"login":"[EMAIL]",
"password":"[PASSWORD]",
"program_id":"[PROGRAM_ID]",
"token": auth.token
});
//Get a profile for a user/member authenticated
let user_profile = await fielo_auth.profile(user.token);
//print info of the user
console.table([user_profile])
})
License
MIT