2.4.0 • Published 5 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.token
parameter 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
5 years ago
2.3.3
5 years ago
2.3.2
5 years ago
2.3.1
5 years ago
2.3.0
5 years ago
2.2.9
5 years ago
2.2.8
5 years ago
2.2.7
5 years ago
2.2.6
5 years ago
2.2.5
5 years ago
2.2.4
5 years ago
2.2.3
5 years ago
2.2.1
5 years ago
2.2.0
5 years ago
2.2.2
5 years ago
1.1.1
5 years ago
1.1.0
5 years ago
1.0.1
5 years ago
2.1.2
5 years ago
2.1.1
5 years ago
2.1.4
5 years ago
2.1.3
5 years ago
2.1.6
5 years ago
2.1.5
5 years ago
2.0.1
5 years ago
2.0.0
5 years ago
1.0.0
5 years ago