(owner: Owner, slug: OAuthClientSlug)
| 668 | // op never cascades into connections). |
| 669 | // ----------------------------------------------------------------------- |
| 670 | const removeClient = (owner: Owner, slug: OAuthClientSlug): Effect.Effect<void, StorageFailure> => |
| 671 | Effect.gen(function* () { |
| 672 | yield* deps.fuma |
| 673 | .use("oauth_client.delete", (db) => |
| 674 | looseDb(db).deleteMany("oauth_client", { |
| 675 | where: (b: any) => b.and(b("owner", "=", owner), b("slug", "=", String(slug))), |
| 676 | }), |
| 677 | ) |
| 678 | .pipe(Effect.asVoid); |
| 679 | // Best-effort: drop the secret from the provider so it isn't orphaned. |
| 680 | const provider = deps.defaultWritableProvider(); |
| 681 | if (provider?.delete) { |
| 682 | yield* provider |
| 683 | .delete(ProviderItemId.make(clientSecretItemId(owner, slug))) |
| 684 | .pipe(Effect.catch(() => Effect.void)); |
| 685 | } |
| 686 | }); |
| 687 | |
| 688 | // ----------------------------------------------------------------------- |
| 689 | // registerDynamicClient — RFC 7591 Dynamic Client Registration. |
nothing calls this directly
no test coverage detected