n8n/docs/generated/sqlite-schema/oauth_clients.md
Ricardo Espinoza c3ca9a36da
feat(editor): Add scope selection to MCP OAuth consent screen (#33710)
Co-authored-by: Danny Martini <danny@n8n.io>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-14 13:21:14 +00:00

3.3 KiB

oauth_clients

Description

Table Definition
CREATE TABLE "oauth_clients" ("id" varchar PRIMARY KEY NOT NULL, "name" varchar(255) NOT NULL, "redirectUris" text NOT NULL, "grantTypes" text NOT NULL, "clientSecret" varchar(255), "clientSecretExpiresAt" bigint, "tokenEndpointAuthMethod" varchar(255) NOT NULL DEFAULT ('none'), "createdAt" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), "updatedAt" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')))

Columns

Name Type Default Nullable Children Parents Comment
clientSecret varchar(255) true
clientSecretExpiresAt bigint true
createdAt datetime(3) STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') false
grantTypes TEXT false
id varchar false oauth_access_tokens oauth_authorization_codes oauth_refresh_tokens oauth_user_consents
name varchar(255) false
redirectUris TEXT false
tokenEndpointAuthMethod varchar(255) 'none' false
updatedAt datetime(3) STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') false

Constraints

Name Type Definition
id PRIMARY KEY PRIMARY KEY (id)
sqlite_autoindex_oauth_clients_1 PRIMARY KEY PRIMARY KEY (id)

Indexes

Name Definition
sqlite_autoindex_oauth_clients_1 PRIMARY KEY (id)

Relations

erDiagram

"oauth_access_tokens" }o--|| "oauth_clients" : "FOREIGN KEY (clientId) REFERENCES oauth_clients (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
"oauth_authorization_codes" }o--|| "oauth_clients" : "FOREIGN KEY (clientId) REFERENCES oauth_clients (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
"oauth_refresh_tokens" }o--|| "oauth_clients" : "FOREIGN KEY (clientId) REFERENCES oauth_clients (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
"oauth_user_consents" }o--|| "oauth_clients" : "FOREIGN KEY (clientId) REFERENCES oauth_clients (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"

"oauth_clients" {
  varchar_255_ clientSecret
  bigint clientSecretExpiresAt
  datetime_3_ createdAt
  TEXT grantTypes
  varchar id PK
  varchar_255_ name
  TEXT redirectUris
  varchar_255_ tokenEndpointAuthMethod
  datetime_3_ updatedAt
}
"oauth_access_tokens" {
  varchar clientId FK
  varchar token PK
  varchar userId FK
}
"oauth_authorization_codes" {
  varchar clientId FK
  varchar_255_ code PK
  varchar codeChallenge
  varchar_255_ codeChallengeMethod
  datetime_3_ createdAt
  bigint expiresAt
  varchar redirectUri
  varchar resource
  TEXT scope
  varchar state
  datetime_3_ updatedAt
  boolean used
  varchar userId FK
}
"oauth_refresh_tokens" {
  varchar clientId FK
  datetime_3_ createdAt
  bigint expiresAt
  TEXT scope
  varchar_255_ token PK
  datetime_3_ updatedAt
  varchar userId FK
}
"oauth_user_consents" {
  varchar clientId FK
  bigint grantedAt
  INTEGER id
  TEXT scope
  varchar userId FK
}

Generated by tbls