diff options
| author | Hazelnoot <acomputerdog@gmail.com> | 2025-04-01 20:47:04 -0400 |
|---|---|---|
| committer | Hazelnoot <acomputerdog@gmail.com> | 2025-04-01 20:47:04 -0400 |
| commit | 6ac37b4d6cae064545b13fd7fdb414d0cffa178b (patch) | |
| tree | 8e938baa2b15ccd233e91429d7f5ed7566ae3606 /packages/backend/src/server/api/SigninApiService.ts | |
| parent | fix typo in check_connect.js (diff) | |
| download | sharkey-6ac37b4d6cae064545b13fd7fdb414d0cffa178b.tar.gz sharkey-6ac37b4d6cae064545b13fd7fdb414d0cffa178b.tar.bz2 sharkey-6ac37b4d6cae064545b13fd7fdb414d0cffa178b.zip | |
lint and type fixes
Diffstat (limited to 'packages/backend/src/server/api/SigninApiService.ts')
| -rw-r--r-- | packages/backend/src/server/api/SigninApiService.ts | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/packages/backend/src/server/api/SigninApiService.ts b/packages/backend/src/server/api/SigninApiService.ts index 72712bce60..7f371ea309 100644 --- a/packages/backend/src/server/api/SigninApiService.ts +++ b/packages/backend/src/server/api/SigninApiService.ts @@ -35,7 +35,8 @@ import type { FastifyReply, FastifyRequest } from 'fastify'; // Up to 10 attempts, then 1 per minute const signinRateLimit: Keyed<RateLimit> = { key: 'signin', - max: 10, + type: 'bucket', + size: 10, dripRate: 1000 * 60, }; @@ -146,7 +147,7 @@ export class SigninApiService { if (isSystemAccount(user)) { return error(403, { - id: 's8dhsj9s-a93j-493j-ja9k-kas9sj20aml2', + id: 'ba4ba3bc-ef1e-4c74-ad88-1d2b7d69a100', }); } @@ -243,7 +244,7 @@ export class SigninApiService { if (profile.password!.startsWith('$2')) { const newHash = await argon2.hash(password); this.userProfilesRepository.update(user.id, { - password: newHash + password: newHash, }); } if (!this.meta.approvalRequiredForSignup && !user.approved) this.usersRepository.update(user.id, { approved: true }); @@ -267,7 +268,7 @@ export class SigninApiService { if (profile.password!.startsWith('$2')) { const newHash = await argon2.hash(password); this.userProfilesRepository.update(user.id, { - password: newHash + password: newHash, }); } await this.userAuthService.twoFactorAuthenticate(profile, token); |