Skip to content

tho-actrecipe/vue-oauth2-google

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)
}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published