1.1.7 • Published 3 years ago

vue-google-login-directive v1.1.7

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

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

1.1.7

3 years ago

1.1.6

3 years ago

1.1.5

3 years ago

1.1.4

3 years ago

1.1.3

3 years ago

1.1.2

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago