Types

Supporting types used by the client.

AuthCredential

An authentication credential for the Privatemode API. Privatemode supports authenticating with an API key, a Clerk session JWT, or anonymously.

type AuthCredential =
  | { type: 'apiKey'; value: string }
  | { type: 'jwt'; value: string }
  | { type: 'anonymous'; value: string };

AuthProvider

A function that returns the credential to authenticate the next request with. It's invoked before every request, so it can return short-lived credentials (such as JWTs) that are refreshed over time.

type AuthProvider = () => AuthCredential | Promise<AuthCredential>;

VerifyResult

Result of verifying the Privatemode deployment.

manifestManifestrequired

The manifest the verification has been performed against.

ExportedSecret

An exported secret that can be cached and restored.

idstringrequired

Secret identifier.

datastringrequired

Base64-encoded secret data.

expiresAtUnixnumberrequired

Expiration as a Unix timestamp (seconds).