2.4.0 • Published 6 years ago
package_murugoauth_web-js v2.4.0
To install the plugin, do the following:
const murugoAuth = require("package_murugoauth_web-js");The package is rendered by calling murugoAuth.
Reference
auth.loggedIn(), returns user's data and store them in localStorage.auth.logOut(token), logs the user's session out on Murugo Cloud.tokenparameter is sent along with this function.
Example
To access user's data, you can do the following:
Javascript
const murugoAuth = require("package_murugoauth_web-js");
const auth = new murugoAuth();
// Function to identify user's data and save them in localStorage.
auth.loggedIn();
// Get murugo_user stored in localStorage under 'murugo_user' key.
let murugo_user = JSON.parse(localStorage.getItem("murugo_user"));To logout:
logout() {
// Logged in token of the user.
let token = this.token
const murugoAuth = require("package_murugoauth_web-js");
const auth = new murugoAuth(token);
// Log out function. token as parameter.
auth.logOut(token);
}
```2.4.0
6 years ago
2.3.3
6 years ago
2.3.2
6 years ago
2.3.1
6 years ago
2.3.0
6 years ago
2.2.9
6 years ago
2.2.8
6 years ago
2.2.7
6 years ago
2.2.6
6 years ago
2.2.5
6 years ago
2.2.4
6 years ago
2.2.3
6 years ago
2.2.1
6 years ago
2.2.0
6 years ago
2.2.2
6 years ago
1.1.1
6 years ago
1.1.0
6 years ago
1.0.1
6 years ago
2.1.2
6 years ago
2.1.1
6 years ago
2.1.4
6 years ago
2.1.3
6 years ago
2.1.6
6 years ago
2.1.5
6 years ago
2.0.1
6 years ago
2.0.0
6 years ago
1.0.0
6 years ago