different-ai/openwork · error · EnterpriseMcpOAuthContractError
MCP_OAUTH_CLIENT_EXPIRED
MCP_OAUTH_CLIENT_EXPIRED
Error message
The OAuth client registration or client secret has expired and must be renewed.
What it means
Error "The OAuth client registration or client secret has expired and must be renewed." thrown in different-ai/openwork.
Source
Thrown at packages/enterprise-mcp-client/src/oauth-provider.ts:343
throw new EnterpriseMcpOAuthContractError(
"MCP_OAUTH_CONFIGURATION_REQUIRED",
"The authorization server does not advertise client metadata documents or dynamic registration; an administrator must supply a pre-registered OAuth client.",
)
}
return undefined
}
const clientInformation = this.storedClientInformation(record.clientInformation, context)
if (!record.revision.trim()) {
throw new EnterpriseMcpOAuthContractError(
"MCP_OAUTH_PERSISTENCE_INVALID",
"The OAuth client registration is missing its persistence revision.",
)
}
if (record.expiresAt !== undefined) {
assertFiniteEpoch(record.expiresAt, "client expiration")
if (record.expiresAt <= this.clock.now() + this.expirationSkewMs) {
await this.persistence.clientRegistrations.invalidate({ context: this.context(), reason: "expired" })
throw new EnterpriseMcpOAuthContractError(
"MCP_OAUTH_CLIENT_EXPIRED",
"The OAuth client registration or client secret has expired and must be renewed.",
)
}
}
this.loadedClient = record
return clientInformation
}
async saveClientInformation(
clientInformation: StoredOAuthClientInformation,
context?: OAuthClientInformationContext,
): Promise<void> {
const validated = this.storedClientInformation(clientInformation, context)
const source = this.clientMetadataUrl === validated.client_id ? "client-metadata" : "dynamic"
const saved = await this.persistence.clientRegistrations.save({
context: this.context(),
clientInformation: validated,View on GitHub (pinned to 2b7df46e8a)
When it happens
Trigger: Thrown at packages/enterprise-mcp-client/src/oauth-provider.ts:343 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of different-ai/openwork@2b7df46e8a (2026-09-01).
Data as JSON: /api/errors/be4252cb2243a5ac.
Report an issue: GitHub.