API reference
tenancy/auth0
Import
Section titled “Import”import * as api from "@fungi.computer/oyster/tenancy/auth0";Exports
Section titled “Exports”| Kind | Export | Description |
|---|---|---|
| type alias | Auth0Transaction | One short-lived, single-use browser authorization transaction. |
| type alias | Auth0Session | Server-owned verified identity session; browsers receive only its random handle. |
| type alias | Auth0BrowserOptions | Host ports for optional browser login; stored state must be shared across host instances. |
| type alias | Auth0Options | Auth0 issuer and audience configuration; browser login is opt-in. |
| function | auth0() | Verify Auth0 identities; the registry alone supplies canonical membership and role. |
Auth0Transactiontype alias
Section titled “Auth0Transaction”type Auth0Transaction = Readonly<{ tenantId: TenantId; redirectUri: string; state: string; codeVerifier: string; expiresAt: number;}>;One short-lived, single-use browser authorization transaction.
Auth0Sessiontype alias
Section titled “Auth0Session”type Auth0Session = Readonly<{ tenantId: TenantId; identity: Identity; expiresAt: number;}>;Server-owned verified identity session; browsers receive only its random handle.
Auth0BrowserOptionstype alias
Section titled “Auth0BrowserOptions”type Auth0BrowserOptions = Readonly<{ callbackPath: string; resolveTenant: ReadonlyTenancy["resolve"]; registry: Pick<ReadonlyTenantRegistry, "get" | "membershipOf">; transactions: Readonly<{ put: Promise<void>; take: Promise<Readonly<{ tenantId: TenantId; redirectUri: string; state: string; codeVerifier: string; expiresAt: number; }> | null>; }>; sessions: Readonly<{ put: Promise<void>; get: Promise<Readonly<{ tenantId: TenantId; identity: Identity; expiresAt: number; }> | null>; }>;}>;Host ports for optional browser login; stored state must be shared across host instances.
Auth0Optionstype alias
Section titled “Auth0Options”type Auth0Options = Readonly<{ domain: string; clientId: string; audience: string; clientSecret?: string; fetch?: typeof globalThis.fetch; browser?: Auth0BrowserOptions;}>;Auth0 issuer and audience configuration; browser login is opt-in.
auth0()function
Section titled “auth0()”function auth0(options): AuthAdapter;Verify Auth0 identities; the registry alone supplies canonical membership and role.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
options |
Auth0Options |