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-authVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to import and install the plugin in both Vue 2 and Vue 3, and use the configured Axios instance.
Change import { _axios, baseConfig } from 'vue-kst-auth'Replace Vue.prototype.$axios = _axios with app.config.globalProperties.$axios = _axios
If using baseConfig in Vue 3, use import { reactive } from 'vue' and wrap the imported object if necessary.Ensure Vue.prototype.$axios = _axios is called before creating the Vue instance in main.ts.
Use import { _axios } from 'vue-kst-auth'Use _axios.get() or _axios.post(), not _axios()