{"record":{"id":"be4252cb2243a5ac","repo":"different-ai/openwork","slug":"mcp-oauth-client-expired","errorCode":"MCP_OAUTH_CLIENT_EXPIRED","errorMessage":"The OAuth client registration or client secret has expired and must be renewed.","messagePattern":"The OAuth client registration or client secret has expired and must be renewed\\.","errorType":"exception","errorClass":"EnterpriseMcpOAuthContractError","httpStatus":null,"severity":"error","filePath":"packages/enterprise-mcp-client/src/oauth-provider.ts","lineNumber":343,"sourceCode":"        throw new EnterpriseMcpOAuthContractError(\n          \"MCP_OAUTH_CONFIGURATION_REQUIRED\",\n          \"The authorization server does not advertise client metadata documents or dynamic registration; an administrator must supply a pre-registered OAuth client.\",\n        )\n      }\n      return undefined\n    }\n    const clientInformation = this.storedClientInformation(record.clientInformation, context)\n    if (!record.revision.trim()) {\n      throw new EnterpriseMcpOAuthContractError(\n        \"MCP_OAUTH_PERSISTENCE_INVALID\",\n        \"The OAuth client registration is missing its persistence revision.\",\n      )\n    }\n    if (record.expiresAt !== undefined) {\n      assertFiniteEpoch(record.expiresAt, \"client expiration\")\n      if (record.expiresAt <= this.clock.now() + this.expirationSkewMs) {\n        await this.persistence.clientRegistrations.invalidate({ context: this.context(), reason: \"expired\" })\n        throw new EnterpriseMcpOAuthContractError(\n          \"MCP_OAUTH_CLIENT_EXPIRED\",\n          \"The OAuth client registration or client secret has expired and must be renewed.\",\n        )\n      }\n    }\n    this.loadedClient = record\n    return clientInformation\n  }\n\n  async saveClientInformation(\n    clientInformation: StoredOAuthClientInformation,\n    context?: OAuthClientInformationContext,\n  ): Promise<void> {\n    const validated = this.storedClientInformation(clientInformation, context)\n    const source = this.clientMetadataUrl === validated.client_id ? \"client-metadata\" : \"dynamic\"\n    const saved = await this.persistence.clientRegistrations.save({\n      context: this.context(),\n      clientInformation: validated,","sourceCodeStart":325,"sourceCodeEnd":361,"githubUrl":"https://github.com/different-ai/openwork/blob/2b7df46e8ae1517d64c896c7793d2d52ec845669/packages/enterprise-mcp-client/src/oauth-provider.ts#L325-L361","documentation":"Error \"The OAuth client registration or client secret has expired and must be renewed.\" thrown in different-ai/openwork.","triggerScenarios":"Thrown at packages/enterprise-mcp-client/src/oauth-provider.ts:343 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2b7df46e8ae1517d64c896c7793d2d52ec845669","analyzedAt":"2026-09-01T07:59:23.713Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}