summaryrefslogtreecommitdiff
path: root/packages/backend/src/core/WebAuthnService.ts
diff options
context:
space:
mode:
authordakkar <dakkar@thenautilus.net>2024-12-15 17:27:12 +0000
committerdakkar <dakkar@thenautilus.net>2024-12-15 17:27:12 +0000
commite2352839e4639b09e2e52b2ada1399097fad1d8d (patch)
tree9268cda477b8c1dcfb2c78eaabcb173a1566a469 /packages/backend/src/core/WebAuthnService.ts
parentmerge: Fix rate limits under multi-node environments (!809) (diff)
parentupstream merge checklist: remember to check federated profile fields (diff)
downloadsharkey-e2352839e4639b09e2e52b2ada1399097fad1d8d.tar.gz
sharkey-e2352839e4639b09e2e52b2ada1399097fad1d8d.tar.bz2
sharkey-e2352839e4639b09e2e52b2ada1399097fad1d8d.zip
merge: upstream changes for 2024.11 (!742)
View MR for information: https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/742 Closes #645 and #646 Approved-by: Hazelnoot <acomputerdog@gmail.com> Approved-by: Marie <github@yuugi.dev>
Diffstat (limited to 'packages/backend/src/core/WebAuthnService.ts')
-rw-r--r--packages/backend/src/core/WebAuthnService.ts4
1 files changed, 1 insertions, 3 deletions
diff --git a/packages/backend/src/core/WebAuthnService.ts b/packages/backend/src/core/WebAuthnService.ts
index 75ab0a207c..ad53192f18 100644
--- a/packages/backend/src/core/WebAuthnService.ts
+++ b/packages/backend/src/core/WebAuthnService.ts
@@ -246,14 +246,12 @@ export class WebAuthnService {
@bindThis
public async verifyAuthentication(userId: MiUser['id'], response: AuthenticationResponseJSON): Promise<boolean> {
- const challenge = await this.redisClient.get(`webauthn:challenge:${userId}`);
+ const challenge = await this.redisClient.getdel(`webauthn:challenge:${userId}`);
if (!challenge) {
throw new IdentifiableError('2d16e51c-007b-4edd-afd2-f7dd02c947f6', 'challenge not found');
}
- await this.redisClient.del(`webauthn:challenge:${userId}`);
-
const key = await this.userSecurityKeysRepository.findOneBy({
id: response.id,
userId: userId,