Skip to content

qrauth-io/qrauth-node

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QRAuth Node.js SDK

The official Node.js SDK for QRAuth - secure QR code authentication and verification.

Installation

npm install @qrauth/node

Quick Start

Create a QR Code

import { QRAuth } from '@qrauth/node';

const qrauth = new QRAuth({
  tenantId: 'your-tenant-id',
  apiKey: 'your-api-key'
});

const qrCode = await qrauth.create({
  destination: 'user@example.com',
  label: 'Login Verification',
  location: {
    lat: 40.7128,
    lng: -74.0060,
    radius: 100
  }
});

console.log(qrCode.qrImageUrl); // Display to user

Verify a Token

const result = await qrauth.verify(token, {
  scannerLat: 40.7128,
  scannerLng: -74.0060
});

if (result.verified) {
  console.log(`Verified by ${result.issuer.name}`);
  console.log(`Trust score: ${result.trustScore}`);
}

API Reference

QRAuth Class

new QRAuth(config: QRAuthConfig)

Initialize the QRAuth client.

create(options: CreateQROptions): Promise<QRCode>

Create a new QR code for authentication.

verify(token: string, options?: VerifyOptions): Promise<VerifyResult>

Verify a QR code token.

revoke(token: string): Promise<void>

Revoke a QR code token.

list(options?: ListOptions): Promise<QRCode[]>

List QR codes with optional filtering.

Full Documentation

For detailed API documentation, visit docs.qrauth.io

About

QRAuth Node.js/TypeScript SDK — @qrauth/node

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors