Enhance debug logging for Cross-Device Passkey Registration
Some checks failed
Code Analysis (JS/Vue) / analyze (push) Failing after 50s
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user