Accountmaker Docs
Types

Client

OAuth 2.0 client application configuration for authentication and token settings.

client oauth application configuration

Client

A Client is an OAuth 2.0 application that authenticates users and requests tokens. Clients define allowed origins, redirect URIs, and token configurations.

Schema

interface Client {
  id: string; // "cid..." - Unique identifier
  resource_id: string; // Owning application or account
  issuer: string;
  audience: string | null;
  allowed_origins: string[];
  redirect_uris: string[];
  allowed_scope: string | null;
  default_scope: string | null;
  access_token_config: TokenConfig | null;
  refresh_token_config: TokenConfig | null;
  id_token_config: TokenConfig | null;
}

interface TokenConfig {
  expires_in: number;
  cookie_options?: {
    http_only?: boolean;
    secure?: boolean;
    same_site?: "lax" | "strict" | "none";
  };
}

Properties

PropertyTypeDescription
idstringKSUID with cid prefix
resource_idstringApplication or account that owns client
issuerstringIssuer claim for tokens
audiencestring?Audience claim for tokens
allowed_originsstring[]Valid CORS origins
redirect_urisstring[]OAuth redirect URLs
allowed_scopestring?Allowed scopes for token requests
default_scopestring?Default scope when none provided
access_token_configobject?Access token settings
refresh_token_configobject?Refresh token settings
id_token_configobject?ID token settings

Example

{
  "id": "cid_2kHfPZcN9xW4mE8RtY7vB",
  "resource_id": "app_root",
  "issuer": "https://auth.example.com",
  "audience": "https://api.example.com",
  "allowed_origins": ["https://app.example.com"],
  "redirect_uris": ["https://app.example.com/callback"],
  "access_token_config": {
    "expires_in": 3600
  },
  "refresh_token_config": {
    "expires_in": 1209600
  }
}