Skip to main content
All Agent API calls need Referer. Browsers manage this header; the fetch examples use the page origin and strict-origin policy. See required request headers. Neuron has two related authentication surfaces in the available specifications: Agent API JWTs authorize HTTP API calls, while HTTP session login authorizes browser access to hosted pages and administration. Start with Sign in with an existing account for a complete HTTP example. For browser or cross-Neuron login, choose a method enabled by your provider.

Direct Agent login

The direct flow sends the login request, receives jwt and expires, and uses the token as Authorization: Bearer <jwt>. The specification describes Refresh and Logout; verify their deployed lifecycle behavior before depending on it. Use the Agent API’s documented signing rules. A request signed for a different host or a reused nonce can fail even when the username and password are correct.

Documented Quick Login shape

Quick Login depends on the current HTTP session, so send cookies:

Documented Remote Quick Login sequence

  1. On the Neuron where the Agent is connected, call PrepareRemoteQuickLogin with its JWT and retain legalId.
  2. In the browser session for the target Neuron, call RemoteQuickLogin with that Legal ID and a user-visible purpose.
  3. The user’s client receives and signs the petition.
  4. Inspect loggedIn and petitionSent. Confirm that successful approval creates the expected HTTP session on the target Neuron.
Do not assume the remote call creates an Agent API JWT for the remote broker. If an administrator-associated identity can gain administrative access, confirm the required permissions and approval UI before enabling the flow.

Token handling

  • Request the shortest practical lifetime; Agent endpoints limit seconds to 3600.
  • Store refresh tokens only in encrypted server-side or storage protected by the operating system.
  • Validate expires instead of assuming a lifetime.
  • Never send a token to a different Neuron host.
  • Treat account, legal-identity, and OAuth scopes as separate authorization decisions.