Build your first secure application with zero-knowledge proof authentication in minutes.
Complete authentication flow in just a few lines of code
Register and authenticate users with zero-knowledge proofs
import { ZKAuthSDK } from 'your-zkauth-http-client';
// Initialize ZKAuth
const zkauth = new ZKAuthSDK({
apiKey: 'zka_...',
baseUrl: 'https://zkp-engine-main-1.vercel.app'
});
// Register a new user
await zkauth.register({
email: 'user@example.com',
password: 'password',
deviceInfo: { deviceName: 'Chrome on Mac', deviceType: 'desktop' }
});
// Authenticate with ZK proof
const session = await zkauth.login({
email: 'user@example.com',
password: 'password',
deviceInfo: { deviceName: 'Chrome on Mac', deviceType: 'desktop' }
});
console.log('Authentication successful!', session.data?.user);Follow these steps to integrate ZKAuth into your application
Sign up for a free ZKAuth account and get your API keys
# Get your API key from the dashboard
export ZKAUTH_API_KEY="zka_live_..."
export ZKAUTH_BASE_URL="https://zkp-engine-main-1.vercel.app"Add ZKAuth to your project with your preferred package manager
# JavaScript/TypeScript
npm install your-zkauth-http-client
# Python SDK (coming soon)
# pip install zkauth
# Go SDK (coming soon)
# go get github.com/zkauth/go-sdkSet up the client with your API credentials
import { ZKAuthSDK } from 'your-zkauth-http-client';
const zkauth = new ZKAuthSDK({
apiKey: process.env.ZKAUTH_API_KEY,
baseUrl: process.env.ZKAUTH_BASE_URL || 'https://zkp-engine-main-1.vercel.app'
});Register a user with zero-knowledge proof authentication
// Register a new user with ZK proof
const result = await zkauth.register({
email: 'user@example.com',
password: 'secure-password',
deviceInfo: { deviceName: 'Chrome on Mac', deviceType: 'desktop' }
});
console.log('User created:', result.data?.userId);Sign in users with cryptographic proof verification
// Authenticate user with ZK proof
const session = await zkauth.login({
email: 'user@example.com',
password: 'secure-password',
deviceInfo: { deviceName: 'Chrome on Mac', deviceType: 'desktop' }
});
if (session.success) {
console.log('Authenticated:', session.data?.user);
}Scale your application with tenant-bound ZK authentication
# Production environment variables
ZKAUTH_API_KEY=zka_live_production_key
ZKAUTH_BASE_URL=https://zkp-engine-main-1.vercel.app
NODE_ENV=productionExplore advanced features and integrations