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 { ZKAuth } from '@zkauth/sdk';
// Initialize ZKAuth
const zkauth = new ZKAuth({
apiKey: 'zka_...',
baseUrl: 'https://api.zkauth.com'
});
// Register a new user
const user = await zkauth.signUp('user@example.com', 'password');
// Authenticate with ZK proof
const session = await zkauth.signIn('user@example.com', 'password');
console.log('Authentication successful!', session);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://api.zkauth.com"Add ZKAuth to your project with your preferred package manager
# JavaScript/TypeScript
npm install @zkauth/sdk
# Python
pip install zkauth
# Go
go get github.com/zkauth/go-sdkSet up the client with your API credentials
import { ZKAuth } from '@zkauth/sdk';
const zkauth = new ZKAuth({
apiKey: process.env.ZKAUTH_API_KEY,
baseUrl: process.env.ZKAUTH_BASE_URL
});Register a user with zero-knowledge proof authentication
// Register a new user
const user = await zkauth.signUp(
'user@example.com',
'secure-password'
);
console.log('User created:', user.id);Sign in users with cryptographic proof verification
// Authenticate user
const session = await zkauth.signIn(
'user@example.com',
'secure-password'
);
if (session.success) {
console.log('Authenticated:', session.user);
}Scale your application with enterprise-grade security
# Production environment variables
ZKAUTH_API_KEY=zka_live_production_key
ZKAUTH_BASE_URL=https://api.zkauth.com
NODE_ENV=productionExplore advanced features and integrations