vue-apple-login-directive

1.1.7 • Public • Published

v-apple-login

A simple Vue directive to include Apple Login Button behavior in any component.

Install

$ npm install --save vue-apple-login-directive
$ yarn add vue-apple-login-directive

Vue2

import Vue from 'vue'
import vAppleLogin from 'vue-apple-login-directive'

Vue.use(vAppleLogin)

Vue 3

import vAppleLogin from 'vue-apple-login-directive'
import { ref } from "vue";

<script setup>
  const appleSettings = ref({
    clientId: "apple_client_id",
    scope: "name email",
    redirectURI: "https://dev.well-scape.com/login",
    state: "origin:web",
    OnSuccess: appleCallBackSuccess,
    Onfail: appleCallBackError,
  });

  function appleCallBackSuccess(data) {
    console.log('appleCallBackSuccess', data);
  }

  function appleCallBackError(error) {
    console.log('appleCallBackError', error);
  }
</script>

<template>
  <div v-apple-login="appleSettings"></div>
</template>

Looking for the Google counterpart?

License

MIT © Jhuril Bandola

Package Sidebar

Install

npm i vue-apple-login-directive

Weekly Downloads

18

Version

1.1.7

License

MIT

Unpacked Size

48.1 kB

Total Files

7

Last publish

Collaborators

  • jhuril45