vue-apple-login-directive
v1.1.7
Published
A simple log in with Apple directive for vue
Downloads
93
Readme
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