1.1.5 • Published 1 year ago

microsoft-login-js v1.1.5

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

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

1.1.5

1 year ago

1.1.4

1 year ago

1.1.3

1 year ago

1.1.2

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago