Skip to main content

Authenticate with the Nora API

Sign up, log in, and manage your Nora account via the Auth API. Includes JWT token usage, profile updates, and password management.
Every protected Nora API endpoint requires an authenticated identity — either a session JWT (covered on this page) or a workspace API key with scopes (see the API overview for the key-and-scope model). You obtain a JWT by signing up and then logging in; it is valid for 7 days, sent as a Bearer token in the Authorization header of every subsequent request, and also accepted as an HttpOnly session cookie. This page covers all authentication endpoints and shows you exactly what each one returns.
An explicit Authorization, X-Api-Key, or X-Nora-Api-Key credential takes precedence over the ambient nora_auth cookie. Do not send conflicting explicit credentials: Nora rejects them with 400 conflicting_auth before either token is verified.
Login and OAuth auth endpoints are rate-limited to 20 requests per 15-minute window per IP. Public signup has stricter burst and daily rate limits, plus Turnstile or reCAPTCHA verification when configured. Hosted PaaS mode requires one of those providers and fails closed when neither is configured; self-hosted mode may explicitly use none.

Bootstrap status

Check whether a self-hosted server still needs its first admin. This drives the “claim this server” first-run flow: until the first user registers (that first account becomes the platform admin), needsFirstAdmin is true; afterward it is false. Hosted PaaS requires an explicit bootstrap administrator before startup and never reports public first-admin claim. The response also contains runtime OAuth visibility, normalized platform mode, and signup-challenge metadata so published frontend images can render the correct auth surface without build-time replacement. Verification secrets are never returned. A user count or emails would aid account enumeration. See the security overview for the broader claim flow.
Public — no authentication required.

Response

boolean
true only while an empty self-hosted installation permits first-account admin claim. Hosted PaaS always reports false.
boolean
Whether the running backend accepts OAuth login. Login and signup hide OAuth controls unless this value is true.
string
Normalized deployment mode: selfhosted or paas.
object
Safe public runtime configuration: enabled, provider, public siteKey, configured, and a user-safe configurationError. Secret verification keys remain backend-only.

Sign up

Create a new user account. On an empty self-hosted installation, the first registered user becomes the platform admin (the first-admin claim flow — see bootstrap status and the security overview). Hosted PaaS must seed its administrator before startup, so public signup there always creates a regular user.

Request body

string
required
A valid email address, maximum 255 characters.
string
required
Password, minimum 8 characters and maximum 128 characters.
string
Optional challenge token. Required only when SIGNUP_BOT_PROTECTION_PROVIDER is set to turnstile or recaptcha.

Response

string
The new user’s UUID.
string
The registered email address.

Error responses


Log in

Exchange email and password for a JWT.

Request body

string
required
Your registered email address.
string
required
Your password.

Response

string
A signed JWT valid for 7 days. Include this value in the Authorization: Bearer <token> header on all subsequent requests.

Error responses


Using the token

Pass the token you received from /auth/login in every request to a protected endpoint:
Tokens expire after 7 days. Your client should catch 401 responses and redirect the user to log in again.

Get current user

Verify a token and retrieve the authenticated user’s profile.
Requires authentication.

Response

string
User UUID.
string
Email address.
string
Display name, may be null if not set.
string
Account role. Typically user or admin.
string
OAuth provider (github, google, etc.) or null for password accounts.
string
Base64-encoded data:image/... avatar, or null.
string
ISO 8601 timestamp of account creation.

Update profile

Update your display name and/or avatar.
Requires authentication.

Request body

string
Display name, 1–100 characters.
string
Base64-encoded image (data:image/png;base64,...), maximum 500 KB. Pass null to remove the avatar.

Response

string
Updated display name.
string
Updated avatar value or null.

Change password

Replace your current password with a new one.
Requires authentication. Not available for OAuth-only accounts.

Request body

string
required
Your existing password.
string
required
New password, minimum 8 characters and maximum 128 characters.

Response

boolean
true when the password was updated successfully.

Error responses


OAuth login

Exchange a server-verified OAuth identity for a Nora session. On success this returns a token plus the user record and sets the HttpOnly session cookie.
This endpoint is disabled by default. Unless OAUTH_LOGIN_ENABLED=true, it returns 403. Google or GitHub credentials must also be configured in the marketing OAuth bridge. Provider tokens are verified server-side before Nora issues a session. Like password login, this endpoint is rate-limited to 20 requests per 15-minute window per IP.

Request body

string
required
OAuth provider identifier (for example github or google).
string
Provider access token. Either this or oauthIdToken is required.
string
Provider ID token. Either this or oauthAccessToken is required.

Response

string
A signed JWT for the linked or newly created account.
object
The authenticated user record.

Upgrade session

Mirror an existing Bearer-token session into the browser’s HttpOnly session cookie. The supplied token is re-verified, so a forged Bearer is rejected.
Requires authentication. Send the token in the Authorization: Bearer <token> header.

Response

boolean
true when the cookie was set.

Log out

Clear the session cookie.
This endpoint intentionally requires no authentication, so a page holding a stale or invalid cookie can still clean itself up.

Response

boolean
true when the cookie was cleared.