(owner: Owner, slug: OAuthClientSlug)
| 607 | // op never cascades into connections). |
| 608 | // ----------------------------------------------------------------------- |
| 609 | const removeClient = (owner: Owner, slug: OAuthClientSlug): Effect.Effect<void, StorageFailure> => |
| 610 | Effect.gen(function* () { |
| 611 | yield* deps.fuma |
| 612 | .use("oauth_client.delete", (db) => |
| 613 | looseDb(db).deleteMany("oauth_client", { |
| 614 | where: (b: any) => b.and(b("owner", "=", owner), b("slug", "=", String(slug))), |
| 615 | }), |
| 616 | ) |
| 617 | .pipe(Effect.asVoid); |
| 618 | // Best-effort: drop the secret from the provider so it isn't orphaned. |
| 619 | const provider = deps.defaultWritableProvider(); |
| 620 | if (provider?.delete) { |
| 621 | yield* provider |
| 622 | .delete(ProviderItemId.make(clientSecretItemId(owner, slug))) |
| 623 | .pipe(Effect.catch(() => Effect.void)); |
| 624 | } |
| 625 | }); |
| 626 | |
| 627 | // ----------------------------------------------------------------------- |
| 628 | // registerDynamicClient — RFC 7591 Dynamic Client Registration. |
nothing calls this directly
no test coverage detected