Skip to content
API reference

tenancy/auth0

Import
import * as api from "@fungi.computer/oyster/tenancy/auth0";
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”
Signature
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”
Signature
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”
Signature
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”
Signature
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.

Signature
function auth0(options): AuthAdapter;

Verify Auth0 identities; the registry alone supplies canonical membership and role.

Parameter Type
options Auth0Options

AuthAdapter