Authentication
Convex verifies host JWT issuer, audience and signature against the configured provider/JWKS. Cortex binds the verified issuer/subject to a trusted active principal, current membership and grant. Metadata claims and AuthContext labels cannot establish runtime authority.
Grants
Capabilities include read, write, run, admin, tool, storage:read and storage:write. Resource access is explicitly own, space or tenant. Trusted operator provisioning selects those rights; browser tokens cannot create or widen them.
Protected operations check current versions/epochs, expiry and resource access. A JWT can remain valid after membership/grant revocation, so signature validity alone is insufficient. Graph workers have a pinned current service grant for the connector scope.
Host lifecycle
Use CortexRuntimeClient.fetchToken and the official refresh handshake. session() resolves actual actor/scope. refreshAuth() verifies replacement credentials; identity/scope changes invalidate old handles/views.
On onAuthChange(false), clear all private host state. On FORBIDDEN, UNAUTHENTICATED, AUTHORITY_EXPIRED or SESSION_CHANGED, clear and close the affected protected view. Ignore stale callbacks from superseded connections.
Client-owned Blob previews, requests and observers are aborted/revoked at authority expiry or close. A mutation deadline remains an uncertain outcome; authentication recovery never implies another model attempt.
See auth setup, auth adapters and isolation.