AuthIdentity schema
Generated from the canonical schema
schemas/auth-identity.schema.jsonbyscripts/generate-schema-docs.mjs— do not edit this page by hand.
A way of authenticating as a User: one external identity-provider account bound to exactly one TfP User. A User may have several (e.g. GitHub and Google). Authentication plumbing, not public identity — providers never appear on a public profile. Account merging (combining two existing Users) is out of scope for v0; linking an additional provider to an existing User is supported.
Schema version: 1.0.0 · $id: https://tokensforprogress.org/schemas/auth-identity.schema.json
Fields
id
Type: string · Required: yes · Mutable: no · Pattern: ^aid_[0-9a-z]{10,32}$
Stable opaque identifier for this login link.
Example: "aid_01jf8z4m2auth"
user_id
Type: string · Required: yes · Mutable: no · Pattern: ^usr_[0-9a-z]{10,32}$
The User this login method authenticates. Immutable: re-binding a provider identity to a different User is account merging, which is out of scope for v0.
Example: "usr_01jf8xw3tempo"
provider
Type: google | github · Required: yes · Mutable: no
The external identity provider. Launch set is Google and GitHub; extending it is a schema revision.
Example: "github"
provider_subject
Type: string · Required: yes · Mutable: no
The provider's stable subject identifier for this account (OIDC sub / GitHub account id) — never an email or username, which providers allow to change. Unique per provider.
Example: "108954321987654321012"
created_at
Type: string · Required: yes · Mutable: no
RFC 3339 UTC timestamp when this login method was linked.
Example: "2026-08-31T15:04:11Z"
JSON Schema source
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://tokensforprogress.org/schemas/auth-identity.schema.json",
"title": "AuthIdentity",
"description": "A way of authenticating as a User: one external identity-provider account bound to exactly one TfP User. A User may have several (e.g. GitHub and Google). Authentication plumbing, not public identity — providers never appear on a public profile. Account merging (combining two existing Users) is out of scope for v0; linking an additional provider to an existing User is supported.",
"x-tfp-version": "1.0.0",
"type": "object",
"additionalProperties": false,
"required": [
"id",
"user_id",
"provider",
"provider_subject",
"created_at"
],
"properties": {
"id": {
"type": "string",
"pattern": "^aid_[0-9a-z]{10,32}$",
"x-mutable": false,
"description": "Stable opaque identifier for this login link.",
"examples": [
"aid_01jf8z4m2auth"
]
},
"user_id": {
"type": "string",
"pattern": "^usr_[0-9a-z]{10,32}$",
"x-mutable": false,
"description": "The User this login method authenticates. Immutable: re-binding a provider identity to a different User is account merging, which is out of scope for v0.",
"examples": [
"usr_01jf8xw3tempo"
]
},
"provider": {
"type": "string",
"enum": [
"google",
"github"
],
"x-mutable": false,
"description": "The external identity provider. Launch set is Google and GitHub; extending it is a schema revision.",
"examples": [
"github"
]
},
"provider_subject": {
"type": "string",
"minLength": 1,
"maxLength": 255,
"x-mutable": false,
"description": "The provider's stable subject identifier for this account (OIDC `sub` / GitHub account id) — never an email or username, which providers allow to change. Unique per provider.",
"examples": [
"108954321987654321012"
]
},
"created_at": {
"type": "string",
"format": "date-time",
"x-mutable": false,
"description": "RFC 3339 UTC timestamp when this login method was linked.",
"examples": [
"2026-08-31T15:04:11Z"
]
}
}
}