Skip to content

Commit

Permalink
tweak password reset rate limit
Browse files Browse the repository at this point in the history
  • Loading branch information
dholms committed Feb 3, 2024
1 parent 3208420 commit 3058f87
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@ export default function (server: Server, ctx: AppContext) {
{
durationMs: DAY,
points: 15,
calcKey: ({ input }) => input.body.email.toLowerCase(),
calcKey: ({ input, req }) =>
`${input.body.email.toLowerCase()}-${req.ip}`,
},
{
durationMs: HOUR,
points: 5,
calcKey: ({ input }) => input.body.email.toLowerCase(),
calcKey: ({ input, req }) =>
`${input.body.email.toLowerCase()}-${req.ip}`,
},
],
handler: async ({ input }) => {
Expand Down

0 comments on commit 3058f87

Please sign in to comment.