Enhance debug logging for Cross-Device Passkey Registration
Some checks failed
Code Analysis (JS/Vue) / analyze (push) Failing after 50s

Add detailed debug statements in the registrieren.vue component to provide insights into the QR-Code generation process and the Cross-Device authentication flow. Additionally, update the register-passkey API to log request details, including user agent and method, to improve troubleshooting capabilities and ensure clarity during the registration process.
This commit is contained in:
Torsten Schulz (local)
2026-01-08 11:56:57 +01:00
parent 0deddeca51
commit 750c05eac1
5 changed files with 667 additions and 1 deletions

View File

@@ -11,12 +11,16 @@ import { assertPasswordNotPwned } from '../../utils/hibp.js'
export default defineEventHandler(async (event) => {
const requestStart = Date.now()
const requestOrigin = getHeader(event, 'origin')
const userAgent = getHeader(event, 'user-agent')
const { origin: webauthnOrigin } = getWebAuthnConfig()
console.log('[DEBUG] register-passkey request received', {
origin: requestOrigin,
webauthnOrigin,
timestamp: new Date().toISOString()
userAgent: userAgent?.substring(0, 100),
timestamp: new Date().toISOString(),
method: getMethod(event),
note: 'Dieser Request sollte vom Smartphone kommen, wenn der QR-Code gescannt wurde'
})
// CORS-Header für Cross-Device Authentication