Registry / auth-security / vue-kst-auth

vue-kst-auth

JSON →
library3.1.3jsnpmunverified

Vue.js 2/3 authentication plugin providing a pre-configured Axios instance with custom headers and base configuration for login state management. Current stable version 3.1.3. Includes TypeScript type definitions. Differentiates by offering a simple plug-and-play setup with token handling out of the box, suitable for projects requiring quick auth integration. Release cadence is irregular.

npm install vue-kst-auth
INSTALL
IMPORT
SIG · VUE-KST-AUTH
V
vue-kst-auth
auth-securityjavascriptv3.1.3
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

_axios
import { _axios } from 'vue-kst-auth'
import _axios from 'vue-kst-auth'
Named export, not default.
baseConfig
import { baseConfig } from 'vue-kst-auth'
const baseConfig = require('vue-kst-auth').baseConfig
CommonJS require is accepted but preferred import syntax.
Vue.prototype.$axios
Vue.prototype.$axios = _axios // in main.ts
Vue.prototype.$axios = require('vue-kst-auth')._axios // avoid when using ES modules
This plugin expects Vue.prototype assignment. For Vue 3 use app.config.globalProperties instead.

Demonstrates how to import and install the plugin in both Vue 2 and Vue 3, and use the configured Axios instance.

import { _axios, baseConfig } from 'vue-kst-auth' // Vue 2 Vue.prototype.$axios = _axios // Vue 3 import { createApp } from 'vue' const app = createApp(App) app.config.globalProperties.$axios = _axios // Usage in any component this.$axios.get('/api/user').then(res => console.log(res.data))
Debug
Known issues
breakingIn version 2.x, the exports were default exports; upgraded to named exports in 3.x.
fix
Change import { _axios, baseConfig } from 'vue-kst-auth'
affects: >=3.0.0
deprecatedVue.prototype usage is deprecated in Vue 3. Use app.config.globalProperties instead.
fix
Replace Vue.prototype.$axios = _axios with app.config.globalProperties.$axios = _axios
affects: >=3.0.0 (Vue 3)
gotchaThe baseConfig object is reactive only in Vue 2; Vue 3 users may need to wrap with ref/reactive if mutations are needed.
fix
If using baseConfig in Vue 3, use import { reactive } from 'vue' and wrap the imported object if necessary.
affects: >=3.0.0 (Vue 3)
Errors
Common errors & fixes
Uncaught TypeError: Cannot read properties of undefined (reading 'get')
Vue.prototype.$axios not assigned or Vue instance not available.
fix
Ensure Vue.prototype.$axios = _axios is called before creating the Vue instance in main.ts.
Module '"vue-kst-auth"' has no exported member '_axios'.
Importing as default instead of named import in TypeScript.
fix
Use import { _axios } from 'vue-kst-auth'
Uncaught TypeError: _axios is not a function
Attempting to call _axios() directly instead of using it as an object (Axios instance).
fix
Use _axios.get() or _axios.post(), not _axios()
Upgrade
Version history
3.1.3latest on npm
Audit
Dependencies
vuerequiredPeer dependency; requires Vue instance to attach $axios prototype.
axiosrequiredUnderlying HTTP client used by _axios.
Agent activity
30 hits · last 30 days
node
24
OpenAI (training)
1
Resources
vue-kst-auth — npm install vue-kst-auth · libregistry