Install
Keys
Publishable key
Starts with
pk_. Safe to expose in the browser. Used by the React provider to identify your agent.API key
Starts with
sk_. A server secret used to mint sessions. Shown once, so store it safely and never ship it to the browser.Environment variables
Keep the API key in a server-side environment variable so it never reaches the browser. The token route reads it asMOSS_FA_API_KEY.
NEXT_PUBLIC_ variable if you prefer. See React components.
Next steps
Server token route
Create the server route that mints a short-lived session for the browser.