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
- Using the Google Identity Services authorization code model a popup dialog for user consent and callback handler to receive the authorization code from Google. https://developers.google.com/identity/oauth2/web/guides/migration-to-gis#gis-popup-ux
- Support Vue.js 2.x
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
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 | ||
| 1.0.1 | MIT | ||
| 1.0.0 | MIT |