1.1.0 • Published 5 years ago

mwp-user-profile v1.1.0

Weekly downloads
-
License
MIT
Repository
-
Last release
5 years ago

Installation

npm i mwp-user-profile or yarn add mwp-user-profile

Usage

import { renderUserProfile } from "mwp-user-profile";
renderUserProfile({
  container: document.querySelector("#user-profile"),
  idToken: "jwt-auth0-idToken",
  baseUrl: "https://mywebportal.domain.com/msn",
  onLogout: this.customFunction
});
  • The container is the element where the component will be attached;

  • idToken is a Json Web Token issued by auth0 that will be parsed by the component to display user info;

  • baseUrl is the base url for the "Profile" and "Logout" pages link;

  • onLogout is your custom code that will be called by clicking on the logout button.

CLI Commands

# install dependencies
npm install

# serve with hot reload at localhost:8080
npm run dev

# build for production with minification
npm run build

# test the production build locally
npm run serve

For detailed explanation on how things work, checkout the CLI Readme.

Use dev module

Using Yarn

See https://yarnpkg.com/lang/en/docs/cli/link/

Using Npm

See https://docs.npmjs.com/cli/link