Skip to content

Authing/vue-authing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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,请点击这里

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published