0.1.0 • Published 3 years ago

octoplus-login-portal v0.1.0

Weekly downloads
-
License
-
Repository
-
Last release
3 years ago

Quick start

1. Install via npm

npm install akita-login-portal --save

2. Make file config at root folder (./akt-lp.config.js)

// akt-lp.config.js
const APP_TOKEN = {
  production: 'b21xxxxxxxxxxxxxxxxxxxx==',
  staging: 'b21xxxxxxxxxxxxxxxxxxxx==',
  development: 'b21xxxxxxxxxxxxxxxxxxx=='
}

const AkitaLoginConfig = {
  env: 'development', // your app env (development, staging, production)
  APP_NAME: 'pos',
  APP_TOKEN, // your app basic token
  production: { // require
    DOMAIN: 'wanwantip-prd.auth0.com',
    CLIENT_ID: 'xxXXxxXXxxXXxxXXxxXXxx'
  },
  staging: { // optional
    DOMAIN: 'wanwantip-stg.auth0.com',
    CLIENT_ID: 'xxXXxxXXxxXXxxXXxxXXxx'
  },
  development: { // require
    DOMAIN: "wanwantip-dev.auth0.com",
    CLIENT_ID: "xxXXxxXXxxXXxxXXxxXXxx",
  }
}

module.exports = AkitaLoginConfig

3. Import and use

// main.js

import Vue from 'vue'
import router from './router' // Your app router
import AkitaLoginPortal from 'akita-login-portal'
import AkitaLoginConfig from './akt-lp.config'

Vue.use(AkitaLoginPortal, {
  router,
  AkitaLoginConfig
})

LOGOUT

// when logout use plugin to clear state
this.$auth.logout()