Package Installation
Auth-Agent SDK is available as an npm package under the nameai-auth.
Package Exports
Theai-auth package provides multiple entry points for different use cases:
Full SDK (Recommended)
Core Client Only
React Components Only
TypeScript Support
The SDK is written in TypeScript and includes comprehensive type definitions.TypeScript Configuration
Make sure yourtsconfig.json includes:
tsconfig.json
Peer Dependencies
For React Applications
For Vanilla JavaScript
No peer dependencies required when using only the core client.Browser Compatibility
Auth-Agent SDK supports modern browsers with the following APIs:- Crypto API: For PKCE generation (SHA-256 hashing)
- Fetch API: For HTTP requests
- LocalStorage/SessionStorage: For token storage
- ES2020+: For JavaScript features
Minimum Versions
CDN Installation
For quick prototyping without a build step:Framework-Specific Setup
- Next.js
- Vite + React
- Create React App
- Vanilla JS
Verify Installation
Create a simple test to verify the SDK is installed correctly:test.ts
Next Steps
Quick Start
Build your first authenticated app
Configuration
Learn about all configuration options