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
| Column | Type | Null | Default | Keys |
|---|---|---|---|---|
| id | text | no | — | PK |
| kind | text dcrcimd | no | — | |
| name | text | no | — | |
| redirect_uris | jsonb | no | [] | |
| client_uri | text | yes | — | |
| logo_uri | text | yes | — | |
| token_endpoint_auth_method | text | no | "none" | |
| client_secret_hash | text | yes | — | |
| metadata | jsonb | no | {} | |
| metadata_fetched_at | timestamp | yes | — | |
| created_at | timestamp | no | now() |
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.
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.