Enhance debug logging for Passkey Registration options
Some checks failed
Code Analysis (JS/Vue) / analyze (push) Failing after 44s

Add detailed debug statements in the registrieren.vue component to validate the complete options structure during Passkey registration. Update the register-passkey API to simplify the options return process, eliminating unnecessary serialization while maintaining comprehensive logging of the options details for improved troubleshooting.
This commit is contained in:
Torsten Schulz (local)
2026-01-08 14:17:18 +01:00
parent a763c959ef
commit 6535abf074
2 changed files with 33 additions and 14 deletions

View File

@@ -443,6 +443,28 @@ const handleRegisterWithPasskey = async () => {
console.error('[DEBUG] Options missing challenge:', JSON.stringify(pre.options, null, 2))
throw new Error('Ungültige WebAuthn-Options vom Server')
}
// Debug: Prüfe die vollständige Options-Struktur
console.log('[DEBUG] Full options structure check:', {
hasChallenge: !!pre.options.challenge,
challengeValue: pre.options.challenge?.substring(0, 20) + '...',
challengeType: typeof pre.options.challenge,
hasRp: !!pre.options.rp,
rpId: pre.options.rp?.id,
rpName: pre.options.rp?.name,
hasUser: !!pre.options.user,
userId: pre.options.user?.id ? 'present' : 'missing',
userIdType: typeof pre.options.user?.id,
userName: pre.options.user?.name,
userDisplayName: pre.options.user?.displayName,
hasPubKeyCredParams: !!pre.options.pubKeyCredParams,
pubKeyCredParamsCount: pre.options.pubKeyCredParams?.length,
hasAuthenticatorSelection: !!pre.options.authenticatorSelection,
timeout: pre.options.timeout,
timeoutType: typeof pre.options.timeout,
allKeys: Object.keys(pre.options),
optionsStringified: JSON.stringify(pre.options).substring(0, 200) + '...'
})
console.log('[DEBUG] Calling startRegistration...')
console.log('[DEBUG] Full options object (will be encoded in QR code for Cross-Device):', JSON.stringify(pre.options, null, 2))