@keverdjs/vue
v1.7.1
Published
Vue.js SDK for Keverd fraud detection and device fingerprinting
Maintainers
Readme
@keverdjs/vue
Vue 3 integration for the Keverd device fingerprinting SDK.
Installation
npm install @keverdjs/vueQuickstart
Initialize the exact same way inside your Vue 3 lifecycle hooks.
<script setup>
import { onMounted, onUnmounted } from 'vue';
import { Keverd } from '@keverdjs/vue';
onMounted(() => {
Keverd.init('YOUR_PUBLIC_API_KEY');
});
onUnmounted(() => {
Keverd.destroy();
});
const submitPayment = async () => {
// Grab the deterministic device token right before making payment
const deviceId = await Keverd.get();
await fetch('/api/checkout', {
method: 'POST',
body: JSON.stringify({ device: deviceId })
});
};
</script>
<template>
<button @click="submitPayment">Pay Securely</button>
</template>