Skip to main content
Session modes let the Neuron act as the backend. Use them when Neuron-hosted pages, scripts, or an Agent API integration require a Quick Login HTTP session.

Neuron-hosted pages

On a page rendered by the Neuron, call QuickLoginServiceId(Request) in Neuron Script and emit the result as the QR element’s data-serviceId:
The double-brace expression is evaluated by the Neuron, not by Mintlify or ordinary HTML. Include the event and QR clients described in the browser quickstart. When the user approves, the Neuron stores a user object in the session variable QuickLoginUser and signals the web client through SignatureReceivedBE. The user has no default privileges; application permissions must be assigned separately. The documented overload QuickLoginServiceId(Request, Timeout) also requests Agent API login, with Timeout expressed in seconds. Confirm the token delivery and allowed lifetime with your provider.

Session-proxy mode

A backend proxy can initiate a session without rendering a page on the Neuron. Add agentApiTimeout to the normal QR request:
The Neuron creates a service registration implicitly and includes serviceId in the response. Preserve the HTTP cookies across requests and keep the event transport associated with the same session. A server-side HTTP client needs a cookie jar; calling fetch repeatedly does not automatically create one in Node.js. Events use the same transport as the reference Events.js and QuickLogin.js. Verify the deployment’s completion payload and session behavior before depending on token delivery. Do not infer a token field from the browser-only identity response.

Exchange an existing session

For a supported existing Quick Login session, the separate Agent API endpoint accepts:
This relative URL must run on the Neuron’s origin or through your configured proxy. It cannot exchange the browser-only demo result. See the Agent API endpoint reference for prerequisites and response fields, and login flows for remote-Neuron login. Use HTTPS, retain cookies securely, and keep JWTs out of URLs and logs. Cross-origin browsers also require credentialed CORS and compatible cookie attributes; a successful browser-only demo does not prove session mode will work from the same origin. Source: Quick Login session and session-proxy modes.