This is a wrapper around oidc-client-js to better work in a Vue application with Vue Router integration.
npm install vue-oidc-client
yarn add vue-oidc-client
You will need to reference both the base oidc-client-js lib and this lib in the script tags in a page.
For this lib there's a compiled version (dists/VueOidcAuth.umd.js
or
dist/VueOidcAuth.umd.min.js
) in the repo if you can't use a cdn.
<!-- sample cdns tied to a version -->
<script src="https://unpkg.com/[email protected]/lib/oidc-client.min.js"></script>
<script src="https://unpkg.com/[email protected]/dist/VueOidcAuth.umd.min.js"></script>
<!-- OR sample cdns to latest version -->
<script src="https://unpkg.com/oidc-client"></script>
<script src="https://unpkg.com/vue-oidc-client"></script>
Note As this lib uses oidc-client
it may be necessary to include
babel-polyfill when using an older browser (IE).
See the wiki for quick docs.
git clone https://github.com/soukoku/vue-oidc-client.git
cd vue-oidc-client
yarn serve
and then browse to the url indicated in the prompt.