Getting Start Guide

Get Started with ZKAuth

Build your first secure application with zero-knowledge proof authentication in minutes.

Your First Authentication

Complete authentication flow in just a few lines of code

Complete Authentication Flow

Register and authenticate users with zero-knowledge proofs

javascript
javascript
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);

Step-by-Step Setup

Follow these steps to integrate ZKAuth into your application

01

Create Your Account

Sign up for a free ZKAuth account and get your API keys

Code
# Get your API key from the dashboard
export ZKAUTH_API_KEY="zka_live_..."
export ZKAUTH_BASE_URL="https://api.zkauth.com"
02

Install the SDK

Add ZKAuth to your project with your preferred package manager

Code
# JavaScript/TypeScript
npm install @zkauth/sdk

# Python
pip install zkauth

# Go
go get github.com/zkauth/go-sdk
03

Initialize ZKAuth

Set up the client with your API credentials

Code
import { ZKAuth } from '@zkauth/sdk';

const zkauth = new ZKAuth({
  apiKey: process.env.ZKAUTH_API_KEY,
  baseUrl: process.env.ZKAUTH_BASE_URL
});
04

Create Your First User

Register a user with zero-knowledge proof authentication

Code
// Register a new user
const user = await zkauth.signUp(
  'user@example.com',
  'secure-password'
);

console.log('User created:', user.id);
05

Authenticate Users

Sign in users with cryptographic proof verification

Code
// Authenticate user
const session = await zkauth.signIn(
  'user@example.com',
  'secure-password'
);

if (session.success) {
  console.log('Authenticated:', session.user);
}
06

Deploy to Production

Scale your application with enterprise-grade security

Code
# Production environment variables
ZKAUTH_API_KEY=zka_live_production_key
ZKAUTH_BASE_URL=https://api.zkauth.com
NODE_ENV=production

What's Next?

Explore advanced features and integrations

Ready to Build?

Start building secure applications with ZKAuth today.