- Never expose long-lived API keys in the browser.
- Keep tokens short-lived and scoped; rotate if compromised.
- For Node/CLI, prefer server API keys.
Setup
Browser Auth Pattern
Secure token minting for client-side SDK and SSE
This pattern lets you use the SDK in the browser without exposing server API keys.
Server (Next.js route handler)
Client (browser)
Notes
