{"id":18914,"library":"vue-kst-auth","title":"vue-kst-auth","description":"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.","status":"active","version":"3.1.3","language":"javascript","source_language":"en","source_url":null,"tags":["javascript","typescript"],"install":[{"cmd":"npm install vue-kst-auth","lang":"bash","label":"npm"},{"cmd":"yarn add vue-kst-auth","lang":"bash","label":"yarn"},{"cmd":"pnpm add vue-kst-auth","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency; requires Vue instance to attach $axios prototype.","package":"vue","optional":false},{"reason":"Underlying HTTP client used by _axios.","package":"axios","optional":false}],"imports":[{"note":"Named export, not default.","wrong":"import _axios from 'vue-kst-auth'","symbol":"_axios","correct":"import { _axios } from 'vue-kst-auth'"},{"note":"CommonJS require is accepted but preferred import syntax.","wrong":"const baseConfig = require('vue-kst-auth').baseConfig","symbol":"baseConfig","correct":"import { baseConfig } from 'vue-kst-auth'"},{"note":"This plugin expects Vue.prototype assignment. For Vue 3 use app.config.globalProperties instead.","wrong":"Vue.prototype.$axios = require('vue-kst-auth')._axios // avoid when using ES modules","symbol":"Vue.prototype.$axios","correct":"Vue.prototype.$axios = _axios // in main.ts"}],"quickstart":{"code":"import { _axios, baseConfig } from 'vue-kst-auth'\n// Vue 2\nVue.prototype.$axios = _axios\n// Vue 3\nimport { createApp } from 'vue'\nconst app = createApp(App)\napp.config.globalProperties.$axios = _axios\n// Usage in any component\nthis.$axios.get('/api/user').then(res => console.log(res.data))","lang":"typescript","description":"Demonstrates how to import and install the plugin in both Vue 2 and Vue 3, and use the configured Axios instance."},"warnings":[{"fix":"Change import { _axios, baseConfig } from 'vue-kst-auth'","message":"In version 2.x, the exports were default exports; upgraded to named exports in 3.x.","severity":"breaking","affected_versions":">=3.0.0"},{"fix":"Replace Vue.prototype.$axios = _axios with app.config.globalProperties.$axios = _axios","message":"Vue.prototype usage is deprecated in Vue 3. Use app.config.globalProperties instead.","severity":"deprecated","affected_versions":">=3.0.0 (Vue 3)"},{"fix":"If using baseConfig in Vue 3, use import { reactive } from 'vue' and wrap the imported object if necessary.","message":"The baseConfig object is reactive only in Vue 2; Vue 3 users may need to wrap with ref/reactive if mutations are needed.","severity":"gotcha","affected_versions":">=3.0.0 (Vue 3)"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Ensure Vue.prototype.$axios = _axios is called before creating the Vue instance in main.ts.","cause":"Vue.prototype.$axios not assigned or Vue instance not available.","error":"Uncaught TypeError: Cannot read properties of undefined (reading 'get')"},{"fix":"Use import { _axios } from 'vue-kst-auth'","cause":"Importing as default instead of named import in TypeScript.","error":"Module '\"vue-kst-auth\"' has no exported member '_axios'."},{"fix":"Use _axios.get() or _axios.post(), not _axios()","cause":"Attempting to call _axios() directly instead of using it as an object (Axios instance).","error":"Uncaught TypeError: _axios is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}