Getting Started
Install the QAuth TypeScript SDK and create your first quantum-safe token in under 5 minutes.
Install
npm install @quantumshield/qauthRequires Node.js 18+. TypeScript 4.7+ recommended.
Quick Start (5 minutes)
Create a token, validate it, and generate a proof of possession — the three core operations.
Core Concepts
QAuth has four main classes, each handling a different part of the authentication flow.
QAuthServer
Creates and validates tokens. Generates Ed25519 signing keys on construction. Used on your auth server to issue tokens and on API servers to validate them.
QAuthClient
Client-side key management. Generates a keypair for proof-of-possession. Stolen tokens are useless without the client's private key.
QAuthValidator
Standalone token validator. Uses pre-shared public keys to validate tokens without access to the signing private key. Deploy on API servers.
PolicyEngine
Fine-grained authorization. Replace OAuth scopes with policy documents that support RBAC, ABAC, time-based conditions, IP restrictions, and MFA requirements.
Token Lifecycle
How a QAuth token flows through your system.
Create
Server generates token with Ed25519 signature
Sign
Dual-signed with Ed25519 + ML-DSA-65 keys
Send
Client receives token and creates proof
Validate
API server verifies signature and expiry
Prove
Client proves key ownership per-request
Distributed Validation
Validate tokens on separate API servers using shared public keys. No private key exposure.
Policy-Based Authorization
Replace OAuth scopes with fine-grained policy documents.
Next Steps
Full Auth System Guide
Build a complete auth system with signup, login, sessions, and protected routes.
API Reference
Complete documentation for every class, method, and type in the SDK.
Policy Engine Guide
Deep dive into policy documents, conditions, and real-world authorization patterns.
Interactive Demo
See QAuth token creation, validation, and proofs in action.