OrvyxDevelopers

Authentication

One bearer token, verified by Supabase Auth on every request. No cookies, no API keys, no signature schemes.

What you send

Send your access token in the Authorization header on every request, using the Bearer scheme. The token is the same Supabase access token your Orvyx session uses — see the quickstart for how to obtain it.

Authorization header
GET /v1/workspaces HTTP/1.1
Host: api.orvyx.io
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...

A request without the header, with a malformed token, or with an expired token fails with401 UNAUTHENTICATED. A valid token for an account that lacks permission fails with 403 FORBIDDEN — keep the two apart when writing retry logic: retrying a 401 will never succeed until you re-authenticate.

How tokens are verified

On every request, the API asks Supabase Auth to verify the token. There is no local JWT parse and no cached verification result — the check runs against the identity provider each time.

The practical consequence cuts in your favor: a token you revoke is dead immediately. There is no propagation window during which a stolen or stale token still works, because nothing is trusted between checks.

Scopes and audience

The API expects the token’s audience to be authenticated — the audience Supabase issues for a signed-in user. A token minted for another audience is rejected before any workspace logic runs.

Tokens grant the caller's own role only

There are no elevated tokens. Whatever your role is inside a workspace — owner, admin, member, viewer — that is exactly what the API enforces. The API never widens a token’s reach, and no header or parameter can.

Origin restrictions

Where you call the API from changes what is required. Server-to-server calls — a worker, a script, a CI job — need nothing beyond the header itself. No origin is attached to a server request, so no origin is checked.

Browser credential use is different. A request that carries browser credentials is only accepted when its Origin matches an allowlist registered for the workspace. A browser page on an unknown origin fails with 403 CSRF_ORIGIN_MISMATCH, even when the token itself is valid. This is what stops a third-party page from spending your session against the API.

Revocation and expiry

Access tokens are short-lived and expire on their own; an expired token returns 401 UNAUTHENTICATED and must be refreshed before the next call. Signing out of the app invalidates the session token, and because verification is delegated to Supabase Auth on every request, that invalidation is immediate — there is no cache to wait out.

Treat the token like a password: keep it out of client-side storage you do not control, out of logs, and out of source control. Long-lived personal access tokens with named revocation are planned; until then, the shortest-lived token that does the job is the right one.