1.1.7 • Published 12 months ago

@musasutisna/vue-auth v1.1.7

Weekly downloads
-
License
MIT
Repository
github
Last release
12 months ago

VueAuth is based on Vue 3 with composition style codes

Getting started

Lets install vue-auth with npm

npm install --save @musasutisna/vue-axios @musasutisna/vue-auth

Configuration

window.config.VUE_AUTH = {
  API_BASEURL: 'your api baseurl',
  API_LOGIN: '/login',
  API_RECOVERY: '/recovery',
  API_LOGOUT: '/u/logout',
  API_VERIFY: '/u/profile',
  TOKEN: 'your auth token',
  LANG: {
    LOGIN_PROCESS: 'loading message of login process',
    RECOVERY_PROCESS: 'loading message of recovery process',
    VERIFY_PROCESS: 'loading message of verify process',
    LOGOUT_PROCESS: 'loading message of logout process'
  }
}

Stores

  • useAuthAPI, axios configured of auth with configured baseUrl and header authorization with Bearer

  • useAuthStore,

PropertyTypeDescription
resultObjectResult response from request login or verify on executed
MethodTypeDescription
toLoginasyncSend request login.
toRecoveryasyncSend request recovery.
toVerifyasyncSend request auth verify.
toLogoutasyncSend request auth logout.

Components

  • VueAuth, verify user authorization on token is exists.
PropsTypeDescription
classStringClass value attributes will be bind into element.
EmitTypeDescription
verifiedfunctionExecuted when verified process is completed
  • VueProtect, verify user authorization.
PropsTypeDescription
classStringClass value attributes will be bind into element.
EmitTypeDescription
verifiedfunctionExecuted when verified process is completed
1.1.1

1 year ago

1.1.0

1 year ago

1.1.7

12 months ago

1.1.6

12 months ago

1.1.5

12 months ago

1.1.3

1 year ago

1.1.2

1 year ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago