fix: PDF-Passkey-Datum i18n und Challenge erst nach Verify löschen

Passkey-Signaturen im PDF nutzen die App-Sprache für Datumsformatierung.
Signing-Challenge bleibt bei fehlgeschlagener WebAuthn-Verifikation retry-fähig.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-05-29 16:48:13 +02:00
parent 81da01e786
commit f87f5e382d
2 changed files with 10 additions and 4 deletions
+2 -2
View File
@@ -204,8 +204,6 @@ router.post('/verify', async (req: any, res) => {
return res.status(400).json({ error: 'Signing context mismatch' })
}
signingChallenges.delete(challenge)
const access = await getLogbookWithAccess(logbookId, req.userId)
if (!access) {
return res.status(403).json({ error: 'Forbidden: Access denied' })
@@ -250,6 +248,8 @@ router.post('/verify', async (req: any, res) => {
return res.status(400).json({ error: 'Signature verification failed' })
}
signingChallenges.delete(challenge)
await prisma.credential.update({
where: { id: dbCred.id },
data: { counter: BigInt(verification.authenticationInfo.newCounter) }