MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / removeClient

Function removeClient

packages/core/sdk/src/oauth-service.ts:682–698  ·  view source on GitHub ↗
(owner: Owner, slug: OAuthClientSlug)

Source from the content-addressed store, hash-verified

680 // op never cascades into connections).
681 // -----------------------------------------------------------------------
682 const removeClient = (owner: Owner, slug: OAuthClientSlug): Effect.Effect<void, StorageFailure> =>
683 Effect.gen(function* () {
684 yield* deps.fuma
685 .use("oauth_client.delete", (db) =>
686 looseDb(db).deleteMany("oauth_client", {
687 where: (b: any) => b.and(b("owner", "=", owner), b("slug", "=", String(slug))),
688 }),
689 )
690 .pipe(Effect.asVoid);
691 // Best-effort: drop the secret from the provider so it isn't orphaned.
692 const provider = deps.defaultWritableProvider();
693 if (provider?.delete) {
694 yield* provider
695 .delete(ProviderItemId.make(clientSecretItemId(owner, slug)))
696 .pipe(Effect.catch(() => Effect.void));
697 }
698 });
699
700 // -----------------------------------------------------------------------
701 // registerDynamicClient — RFC 7591 Dynamic Client Registration.

Callers

nothing calls this directly

Calls 3

looseDbFunction · 0.85
clientSecretItemIdFunction · 0.85
deleteMethod · 0.65

Tested by

no test coverage detected