1.0.3 • Published 2 years ago

@nv4re/akita-login-portal v1.0.3

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

Quick start

Develop & Contribution

GITLAB_AUTH_TOKEN=<Personal Access Token> npm install

Publish the package

GITLAB_AUTH_TOKEN=<Personal Access Token> npm publish

1. Install via npm

npm config set @sellsuki:registry https://gitlab.com/api/v4/packages/npm/
npm config set -- '//gitlab.com/api/v4/packages/npm/:_authToken' "<Personal Access Token>"
npm install @sellsuki/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 '@sellsuki/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()
1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago