API Reference
Complete API reference for Nuxt Aegis.
Client-Side API
Composables
useAuth()- Authentication state and methods
Server-Side API
HTTP Endpoints
- Authentication Endpoints - REST API for authentication flows
Server Utilities
- Authentication Utils - Server-side helper functions
Event Handlers
- OAuth Handlers - Define OAuth provider endpoints
Type Definitions
- TypeScript Types - Type definitions and interfaces
Quick Reference
Authentication Flow
Common Operations
| Operation | Client API | Server API |
|---|---|---|
| Check auth | const { isAuthenticated } = useAuth() | await getAuthUser(event) |
| Get user | const { user } = useAuth() | await requireAuth(event) |
| Login | await login('google') | N/A |
| Logout | await logout() | N/A |
| Refresh | await refresh() | N/A |