vue-oauth2-google

1.0.20 • Public • Published

vue-oauth2-google

Installation

Installation with npm

npm install vue-oauth2-google

Initialization

import GAuth from 'vue-oauth2-google'

methods: {
	successCallback (code) {
		this.$http.post('YOUR_AUTHORIZATION_CODE_ENDPOINT_URI', { code: code }).then(response => {
			console.log(response)
		})
	},
	errorCallback (error) {
		console.log(error)
	}
},
mounted () {
	const gauthOption = {
		clientId: this.getGoogleClientId,
		scope: 'profile email',
		successCallback: this.successCallback,
		errorCallback: this.errorCallback
	}
	Vue.use(GAuth, gauthOption)
}

/vue-oauth2-google/

    Package Sidebar

    Install

    npm i vue-oauth2-google

    Weekly Downloads

    32

    Version

    1.0.20

    License

    MIT

    Unpacked Size

    7.2 kB

    Total Files

    6

    Last publish

    Collaborators

    • tho-asterist