UNPKG

@websanova/vue-auth

Version:

A simple light-weight authentication library for Vue.js

19 lines (15 loc) 386 B
import Auth from './auth.js'; function plugin(Vue, options) { Vue.auth = new Auth(Vue, options); Object.defineProperties(Vue.prototype, { $auth: { get: function () { return Vue.auth; } } }); } if (typeof window !== 'undefined' && window.Vue) { window.Vue.use(plugin); } export default plugin;