Socket
Book a DemoInstallSign in
Socket

@trueguard/trueguard-js

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@trueguard/trueguard-js

JavaScript SDK for Trueguard verification and fingerprinting

1.0.6
latest
npmnpm
Version published
Weekly downloads
318
-1.55%
Maintainers
1
Weekly downloads
 
Created
Source

@trueguard/trueguard-js

JavaScript SDK for Trueguard verification and fingerprinting

Trueguard is a comprehensive fraud detection and bot prevention platform. This JavaScript SDK allows you to easily integrate Trueguard's verification and fingerprinting capabilities into your web applications.

📦 Installation

npm install @trueguard/trueguard-js
yarn add @trueguard/trueguard-js
pnpm add @trueguard/trueguard-js

🔧 Quick Start

Basic Usage

import { Trueguard } from "@trueguard/trueguard-js";

// Initialize with your public API key
const trueguard = new Trueguard({ apiKey: "your-public-api-key" });

// Create a verification session
try {
  const verificationId = await trueguard.verificationSession();
  console.log("Verification ID:", verificationId);

  // Use the verification ID in your login, register, etc. API calls
  // to associate user actions with this verification session
} catch (error) {
  console.error("Verification failed:", error.message);
}

ES Modules

import Trueguard from "@trueguard/trueguard-js";

const trueguard = new Trueguard({ apiKey: "your-public-api-key" });

CommonJS

const { Trueguard } = require("@trueguard/trueguard-js");

const trueguard = new Trueguard({ apiKey: "your-public-api-key" });

Browser (Global)

<script src="https://unpkg.com/@trueguard/trueguard-js/dist/index.global.js"></script>
<script>
  const trueguard = new Trueguard.Trueguard({ apiKey: "your-public-api-key" });
</script>

📚 API Reference

Constructor

new Trueguard(publicApiKey: string)

Creates a new Trueguard instance.

Parameters:

  • publicApiKey (string): Your Trueguard public API key

Example:

const trueguard = new Trueguard("pub-1234567890abcdef");

Methods

verificationSession(): Promise<string>

Initiates a verification session by collecting browser and network fingerprints.

Returns:

  • Promise<string>: A promise that resolves to a unique verification ID

Throws:

  • Error: If verification fails or if not running in a browser environment

🏢 About Trueguard

Trueguard provides enterprise-grade fraud detection and bot prevention solutions. Our platform combines advanced fingerprinting, machine learning, and real-time risk assessment to protect your business from automated attacks and fraudulent activity.

Trueguard

FAQs

Package last updated on 25 Aug 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.