vue-google-login-directive
v1.1.7
Published
A simple log in with Google directive for vue
Downloads
40
Readme
v-google-login
A simple Vue directive to include Google Login Button behavior in any component.
Install
$ npm install --save vue-google-login-directive
$ yarn add vue-google-login-directive
Vue2
import Vue from 'vue'
import vGoogleLogin from 'vue-google-login-directive'
Vue.use(vGoogleLogin)
Vue 3
import vGoogleLogin from 'vue-google-login-directive'
import { ref } from "vue";
<script setup>
const googleSettings = ref({
client_id: "google_client_id",
OnSuccess: googleCallBackSuccess,
Onfail: googleCallBackError,
});
function googleCallBackSuccess(data) {
console.log('googleCallBackSuccess', data);
}
function googleCallBackError(error) {
console.log('googleCallBackError', error);
}
</script>
<template>
<div v-google-login="googleSettings"></div>
</template>
Looking for the Apple counterpart?
License
MIT © Jhuril Bandola