(owner: Owner, slug: OAuthClientSlug)
| 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. |
nothing calls this directly
no test coverage detected