This commit is contained in:
Baobhan Sith
2025-05-08 17:15:44 +08:00
parent 6e80b185df
commit 3b1d404040
6 changed files with 35 additions and 14 deletions
@@ -206,6 +206,7 @@ export const verifyPasskeyAuthenticationHandler = async (req: Request, res: Resp
reason: 'Verification failed',
ip: clientIp
});
notificationService.sendNotification('PASSKEY_AUTH_FAILURE', { credentialId: authenticationResponseJSON?.id || 'unknown', reason: 'Verification failed', ip: clientIp });
res.status(401).json({ verified: false, message: 'Passkey 认证失败。' });
}
} catch (error: any) {
@@ -216,6 +217,7 @@ export const verifyPasskeyAuthenticationHandler = async (req: Request, res: Resp
reason: error.message,
ip: clientIp
});
notificationService.sendNotification('PASSKEY_AUTH_FAILURE', { credentialId: authenticationResponseJSON?.id || 'unknown', reason: error.message, ip: clientIp });
res.status(500).json({ verified: false, message: '验证 Passkey 认证失败。', error: error.message });
}
};