vue-authing

0.0.1 • Public • Published

vue-authing

这是 Authing SDK for Vue 的插件。

安装

$ npm install vue-authing --save

使用

import Vue from 'vue';
import App from './App.vue'

import VueAuthing from 'vue-authing';

Vue.use(VueAuthing, {
	clientId: 'client_id',
	secret: 'secret'
});

new Vue({
    render: h => h(App),
}).$mount('#app')

注意在所有组件中都需要加这么一句代码以取得 Authing 实例:

async beforeCreate() {
    await this.$_authing;
    console.log(this.$authing);

    // e.g this.$authing.login
    // e.g this.$authing.register
}

获取Client ID和Client Secret,请点击这里

Readme

Keywords

Package Sidebar

Install

npm i vue-authing

Weekly Downloads

1

Version

0.0.1

License

ISC

Unpacked Size

251 kB

Total Files

7

Last publish

Collaborators

  • ivydom