lkmeet-livekit-auth-api v0.1.0
subsystem
capsule://quake0day/[email protected]
Provides a backend API endpoint for generating LiveKit participant access tokens. This capsule handles authentication logic and token creation, which is a critical part of any LiveKit application.
Owns
- API endpoint for connection details
Does not own
- Client-side token usage
- LiveKit server configuration
AI orientation
This capsule is a Next.js API route that uses `livekit-server-sdk` to create access tokens. It reads environment variables for LiveKit credentials and relies on `lkmeet-livekit-client-utils` for helper functions like `randomString` and `getLiveKitURL`. Focus on token generation logic and secure handling of LiveKit API keys.
Provides
http_api:/api/connection-detailsโ Endpoint to request LiveKit connection details and participant token.
Dependencies
Capsules
lkmeet-livekit-client-utils>=0.1.0
Invariants (must always hold)
- Requires valid LIVEKIT_API_KEY, LIVEKIT_API_SECRET, and LIVEKIT_URL to function.
- Generated tokens must grant appropriate video permissions for room joining, publishing, and subscribing.
- The `COOKIE_KEY` for participant postfix must remain consistent for session continuity.
Source files (1)
Click any file to view its content; the path on the right shows where the file lands when this capsule is installed.
src/app/api/connection-details/route.tsโsrc/api/connection-details/route.ts
Plus capsule.yaml and
install.json.