vue-oauth2-google

Using the Google Identity Services authorization code model a popup dialog for user consent and callback handler to receive the authorization code from Google.
1,005
Install
npm install vue-oauth2-google
Latest Version:1.0.20
Vue:2
License:MIT
Last Updated:Oct 5, 2022
Links: npm
Maintainer: tho-asterist

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

Related Packages

vue-google-api

This vue 2 plugin is a wrapper for the script needed to do client side operation...

10,121 33
vue-google-oauth2

Handling Google Auth2 sign-in and sign-out

175,570 180
vue3-google-oauth2

Handling Google sign-in and sign-out for Vue3 applications.

141,765 56
oidc-js-vue

Simple OIDC authentication for Vue. Plugin, composables, and navigation guards w...

1,013 3
@proteles/vue

Vue 3 composables and components for Proteles authentication, plus Nuxt/h3 serve...

465 0

Version History

Version Released Vue License
1.0.20 ^2.6.0 MIT
1.0.5 MIT
1.0.4 MIT
1.0.3 MIT
1.0.2 MIT