binding.ts
This file
Path
apps/platform/src/auth/attempts/binding.ts
14 lines · 364 bytes · TypeScript
Last changed by
Merge build/comments-platform into mainoscabrielbefore adoptionddf09e8
History of this fileTake it
The walk stopped after 200 commits: lines older than 678c8b8 point at it.
Merge build/614-env-service: deciders set write-only values for @sensitive items, the public sees the env shape, and checks see only placeholdersoscabrielbefore adoption678c8b8
lines 1–14why, one step back1import { Effect, Layer } from "effect";23import { SignInAttempts } from "../attempts.ts";45export const SignInAttemptsBinding = (limiter: RateLimit) =>6 Layer.succeed(7 SignInAttempts,8 SignInAttempts.of({9 admit: (key) =>10 Effect.promise(() => limiter.limit({ key })).pipe(11 Effect.map(({ success }) => success)12 ),13 })14 );