We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 66c245e commit 67badfcCopy full SHA for 67badfc
packages/backend/src/core/WebAuthnService.ts
@@ -246,14 +246,12 @@ export class WebAuthnService {
246
247
@bindThis
248
public async verifyAuthentication(userId: MiUser['id'], response: AuthenticationResponseJSON): Promise<boolean> {
249
- const challenge = await this.redisClient.get(`webauthn:challenge:${userId}`);
+ const challenge = await this.redisClient.getdel(`webauthn:challenge:${userId}`);
250
251
if (!challenge) {
252
throw new IdentifiableError('2d16e51c-007b-4edd-afd2-f7dd02c947f6', 'challenge not found');
253
}
254
255
- await this.redisClient.del(`webauthn:challenge:${userId}`);
256
-
257
const key = await this.userSecurityKeysRepository.findOneBy({
258
id: response.id,
259
userId: userId,
0 commit comments