2.4.0 • Published 4 years ago

package_murugoauth_web-js v2.4.0

Weekly downloads
2
License
ISC
Repository
github
Last release
4 years ago

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

4 years ago

2.3.3

4 years ago

2.3.2

4 years ago

2.3.1

4 years ago

2.3.0

4 years ago

2.2.9

4 years ago

2.2.8

4 years ago

2.2.7

4 years ago

2.2.6

4 years ago

2.2.5

4 years ago

2.2.4

4 years ago

2.2.3

4 years ago

2.2.1

4 years ago

2.2.0

4 years ago

2.2.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.1

4 years ago

2.1.2

4 years ago

2.1.1

4 years ago

2.1.4

4 years ago

2.1.3

4 years ago

2.1.6

4 years ago

2.1.5

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago

1.0.0

4 years ago