@keverdjs/angular
v1.7.1
Published
Angular SDK for Keverd fraud detection and device fingerprinting
Maintainers
Readme
@keverdjs/angular
Angular SDK for Keverd deterministic device fingerprinting.
Installation
npm install @keverdjs/angularQuickstart
Init Keverd once inside your application boot or component initialization, and await Keverd.get() inside your action emitters.
import { Component, OnInit, OnDestroy } from '@angular/core';
import { Keverd } from '@keverdjs/angular';
@Component({
selector: 'app-checkout',
template: `<button (click)="onCheckout()">Checkout</button>`
})
export class CheckoutComponent implements OnInit, OnDestroy {
ngOnInit() {
Keverd.init('YOUR_PUBLIC_API_KEY');
}
ngOnDestroy() {
Keverd.destroy();
}
async onCheckout() {
const deviceId = await Keverd.get();
// Append `deviceId` to your HTTP payloads
console.log("Submitting context: ", deviceId);
}
}