microsoft-login-js
v1.1.5
Published
A simple log in with Microsoft directive for vue
Downloads
9
Maintainers
Readme
v-microsoft-login
A simple Vue directive to include Apple Login Button behavior in any component.
Install
$ npm install --save vue-microsoft-login-directive
$ yarn add microsoft-login-js
Vue2
import Vue from 'vue'
import vMicrosoftLogin from 'vue-microsoft-login-directive'
Vue.use(vMicrosoftLogin)
Vue 3
import vMicrosoftLogin from 'vue-microsoft-login-directive'
import { ref } from "vue";
<script setup>
const microsoftSettings = ref({
auth: {
clientId,
authority,
redirectUri,
cacheLocation,
storeAuthStateInCookie,
},
request: {
scopes,
prompt,
response_type
},
OnSuccess: microsoftCallBackSuccess,
Onfail: microsoftCallBackError,
});
function microsoftCallBackSuccess(data) {
console.log('microsoftCallBackSuccess', data);
}
function microsoftCallBackError(error) {
console.log('microsoftCallBackError', error);
}
</script>
<template>
<div v-microsoft-login="microsoftSettings"></div>
</template>
Looking for the Google counterpart?
License
MIT © Jhuril Bandola