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
muslnode 18–226 runs
build_error
glibcnode 18–226 runs
build_error
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
default
✓ import VueOidcClient from 'vue-oidc-client'
✗ import { VueOidcClient } from 'vue-oidc-client'
Default import for the main plugin object. In v1.0.0-alpha.x, the plugin is exported as default; named import works only if you import specific submodules.
OidcCallback
✓ import { OidcCallback } from 'vue-oidc-client'
✗ import OidcCallback from 'vue-oidc-client/OidcCallback'
Named export for the callback component. In v1.0.0-alpha.x, these components are exported from the main package; direct subpath imports may not work.
OidcSilentCallback
✓ import { OidcSilentCallback } from 'vue-oidc-client'
✗ import OidcSilentCallback from 'vue-oidc-client/dist/OidcSilentCallback'
Named export for the silent callback component. Avoid deep imports from dist folder.
Shows Vue 3 setup with router and OIDC client plugin, including callback route and minimal configuration.
import { createApp } from 'vue';
import { createRouter, createWebHistory } from 'vue-router';
import VueOidcClient, { OidcCallback } from 'vue-oidc-client';
const router = createRouter({
history: createWebHistory(),
routes: [
{ path: '/callback', component: OidcCallback },
],
});
const app = createApp({});
app.use(VueOidcClient, {
authority: 'https://your-identity-server',
client_id: 'your-client-id',
redirect_uri: window.location.origin + '/callback',
response_type: 'code',
scope: 'openid profile',
});
app.use(router);
app.mount('#app');
Errors
Common errors & fixes
Cannot find module 'vue-oidc-client' or its corresponding type declarations.
Missing or outdated type definitions; npm package may not include types for v1.0.0-alpha.x builds.
fixInstall the latest alpha: npm install vue-oidc-client@1.0.0-alpha.5 . Also ensure tsconfig includes 'moduleResolution': 'node'.
Property '$oidc' does not exist on type 'ComponentCustomProperties'.
TypeScript not aware of the injected $oidc property; global augmentation missing or not imported.
fixAdd 'import 'vue-oidc-client/dist/types/vue-shim'' in your main.ts or create a declaration file for Vue.$oidc.
Failed to mount component: template or render function not defined.
Using wrong import for OidcCallback or OidcSilentCallback; importing from subpath instead of main package in v1.0.0-alpha.x.
fixUse import { OidcCallback } from 'vue-oidc-client' (not from a subpath). Uncaught (in promise) Error: no response_type set
Missing or incorrect 'response_type' in OIDC configuration; defaults may not be set.
fixExplicitly set response_type: 'code' in plugin configuration.
Upgrade
Version history
1.0.0-alpha.5latest on npm
Audit
Dependencies
oidc-client-tsrequiredCore OIDC/OAuth2 client implementation; vue-oidc-client wraps this library.
vue-routerrequiredRequired for route-based authentication flow (e.g., redirect and callback handling).