summaryrefslogtreecommitdiff
path: root/packages/backend/src/core/WebAuthnService.ts
diff options
context:
space:
mode:
authordakkar <dakkar@thenautilus.net>2024-11-22 12:29:04 +0000
committerdakkar <dakkar@thenautilus.net>2024-11-22 12:29:04 +0000
commitbc816cb166d907d38eb096a02c5f4f57d9a2f1a0 (patch)
treea0e6b1dfeed8aa2b0543846eb65b8aae0ce631ad /packages/backend/src/core/WebAuthnService.ts
parentbetter wording for moderator inactivity messages (diff)
parentRelease: 2024.11.0 (diff)
downloadsharkey-bc816cb166d907d38eb096a02c5f4f57d9a2f1a0.tar.gz
sharkey-bc816cb166d907d38eb096a02c5f4f57d9a2f1a0.tar.bz2
sharkey-bc816cb166d907d38eb096a02c5f4f57d9a2f1a0.zip
Merge tag '2024.11.0' into feature/2024.10
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,