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