Skip to content
Identity & auth

oauth_clients

A registered app. `id` is the client_id: a random id for Dynamic Client Registration (RFC 7591), or the https URL of a Client ID Metadata Document, whose fetched document is cached here (`metadataFetchedAt`).

Columns

ColumnTypeNullDefaultKeys
idtext no—
PK
kindtext
dcrcimd
no—
nametext no—
redirect_urisjsonb no[]
client_uritext yes—
logo_uritext yes—
token_endpoint_auth_methodtext no"none"
client_secret_hashtext yes—
metadatajsonb no{}
metadata_fetched_attimestamp yes—
created_attimestamp nonow()

Value lists come from .$type<'a' | 'b'>() in the schema — enforced in TypeScript only, not by the database.

Keys, constraints & indexes

Unique

None besides the primary key.

Indexes

No secondary indexes.

Foreign keys

None.

Referenced by

Used by

Code that reads or writes this table, found by static analysis of the tRPC routers and API handlers (including helpers they call).

REST & webhooks

  • ANY /mcp
  • ANY /mcp/public
  • ANY /oauth/register
  • ANY /oauth/revoke
  • ANY /oauth/token

Relations

Rendering diagram…

Diagram source
erDiagram
  oauth_clients {
    text id PK
  }
  oauth_grants {
    uuid id PK
    uuid dancer_id FK
    text client_id FK
  }
  oauth_clients ||--o{ oauth_grants : "client_id"

Defined at server/database/schema.ts:1335 as oauthClients.