Enhance debug logging and Cross-Device support for Passkey Registration
Some checks failed
Code Analysis (JS/Vue) / analyze (push) Failing after 45s
Some checks failed
Code Analysis (JS/Vue) / analyze (push) Failing after 45s
Update the registrieren.vue component to include detailed debug statements for the Cross-Device authentication flow, specifically during QR-Code generation. Improve logging in the register-passkey-options and register-passkey APIs to capture request details such as user agent and IP address, aiding in troubleshooting. Additionally, introduce a new function to retrieve pre-registration data, enhancing the overall registration process and compliance with Cross-Device requirements.
This commit is contained in:
@@ -4,10 +4,17 @@ export default defineEventHandler(async (event) => {
|
||||
const requestOrigin = getHeader(event, 'origin')
|
||||
const { origin: webauthnOrigin } = getWebAuthnConfig()
|
||||
|
||||
console.log('[DEBUG] OPTIONS preflight request received', {
|
||||
origin: requestOrigin,
|
||||
const userAgent = getHeader(event, 'user-agent')
|
||||
const ip = getHeader(event, 'x-forwarded-for') || getHeader(event, 'x-real-ip') || 'unknown'
|
||||
|
||||
console.log('[DEBUG] ===== OPTIONS preflight for /api/auth/register-passkey-options =====')
|
||||
console.log('[DEBUG] OPTIONS Request Details:', {
|
||||
origin: requestOrigin || 'none',
|
||||
webauthnOrigin,
|
||||
timestamp: new Date().toISOString()
|
||||
userAgent: userAgent?.substring(0, 100) || 'none',
|
||||
ip,
|
||||
timestamp: new Date().toISOString(),
|
||||
note: 'OPTIONS Preflight für Passkey Registration Options'
|
||||
})
|
||||
|
||||
// CORS-Header für Cross-Device Authentication
|
||||
|
||||
Reference in New Issue
Block a user