Choose your platform and get ZKAuth running in minutes with our comprehensive installation guides.
Select your preferred programming language or framework
Node.js, React, Vue, Angular, and more
Django, FastAPI, Flask, and more (SDK coming soon)
High-performance Go applications (SDK coming soon)
Memory-safe systems programming (SDK coming soon)
React hooks and components
Vue 3 composition API
Follow these steps to install and configure ZKAuth
Install ZKAuth for JavaScript/TypeScript
# npm
npm install your-zkauth-http-client
# yarn
yarn add your-zkauth-http-client
# pnpm
pnpm add your-zkauth-http-clientInitialize ZKAuth in your JavaScript/TypeScript application
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'
});Seamless integration with popular frameworks
Server-side rendering and API routes
// pages/api/auth/[...nextauth].js
import NextAuth from 'next-auth'
import { ZKAuthProvider } from './zkauth-next-helper'
export default NextAuth({
providers: [
ZKAuthProvider({
clientId: process.env.ZKAUTH_CLIENT_ID,
clientSecret: process.env.ZKAUTH_CLIENT_SECRET,
}),
],
})Node.js web application framework
const express = require('express');
const { ZKAuthMiddleware } = require('./zkauth-node-helper');
const app = express();
// Initialize ZKAuth middleware
const zkAuth = new ZKAuthMiddleware({
apiKey: process.env.ZKAUTH_API_KEY
});
// Protected route middleware
const requireAuth = zkAuth.authenticate();
app.get('/protected', requireAuth, (req, res) => {
res.json({ user: req.user });
});Python web framework
# settings.py
INSTALLED_APPS = [
# ...
'zkauth',
]
ZKAUTH_API_KEY = 'zka_...'
ZKAUTH_BASE_URL = 'https://zkp-engine-main-1.vercel.app'
# views.py
from zkauth.decorators import zkauth_required
@require_zkauth_session
def protected_view(request):
user = request.zkauth_user
return JsonResponse({'user': user})Set up your environment variables and configuration
Configure your API keys and endpoints
# Environment Variables (.env)
ZKAUTH_API_KEY=zka_live_your_api_key_here
ZKAUTH_BASE_URL=https://zkp-engine-main-1.vercel.app
# Development
ZKAUTH_API_KEY=zka_test_your_test_key_here
# Production
ZKAUTH_API_KEY=zka_live_your_production_key_hereContinue your journey with ZKAuth