liuxuanhe / vue-oidc-client

Wrapper around oidc-client-js to better work in a vue application with router integration

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

vue-oidc-client

This is a wrapper around oidc-client-js to better work in a Vue application with Vue Router integration.

Installation

NPM

npm install vue-oidc-client

Yarn

yarn add vue-oidc-client

Browser only

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/oidc-client@1.7.1/lib/oidc-client.min.js"></script>
<script src="https://unpkg.com/vue-oidc-client@3.0/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).

Usage

See the wiki for quick docs.

Getting the Source

git clone https://github.com/soukoku/vue-oidc-client.git
cd vue-oidc-client

Running the sample

yarn serve

and then browse to the url indicated in the prompt.

About

Wrapper around oidc-client-js to better work in a vue application with router integration

License:MIT License


Languages

Language:JavaScript 100.0%