Refine Passkey registration logging and API options for local authenticators
Some checks failed
Code Analysis (JS/Vue) / analyze (push) Failing after 43s

Update the registrieren.vue component to enhance debug logging for local authenticator usage, providing clearer messages about the expected behavior during registration. Modify the register-passkey-options API to specify the use of local authenticators, ensuring better clarity on the authenticator selection process. This update aims to improve user understanding and troubleshooting during Passkey registration without the need for Cross-Device functionality.
This commit is contained in:
Torsten Schulz (local)
2026-01-09 08:30:40 +01:00
parent 1ef5f7cc07
commit 49a8d78b4f
2 changed files with 36 additions and 19 deletions

View File

@@ -745,24 +745,33 @@ const handleRegisterWithPasskey = async () => {
// Prüfe, ob ein lokaler Authenticator verfügbar ist // Prüfe, ob ein lokaler Authenticator verfügbar ist
// Wenn ja, wird möglicherweise kein Cross-Device verwendet // Wenn ja, wird möglicherweise kein Cross-Device verwendet
if (platformAuthAvailable) { if (platformAuthAvailable) {
console.warn('[DEBUG] ⚠️ WARNUNG: Platform Authenticator ist verfügbar!') console.log('[DEBUG] Platform Authenticator ist verfügbar!')
console.warn('[DEBUG] Der Browser könnte einen lokalen Authenticator verwenden (Windows Hello, TouchID)') console.log('[DEBUG] Der Browser wird wahrscheinlich einen lokalen Authenticator verwenden:')
console.warn('[DEBUG] statt Cross-Device. Prüfe, ob ein QR-Code erscheint oder ein lokaler Dialog.') console.log('[DEBUG] - Windows Hello (biometrisch oder PIN)')
console.log('[DEBUG] - TouchID auf Mac')
console.log('[DEBUG] - USB-Sicherheitsschlüssel')
console.log('[DEBUG] - Lokale Passkey-Speicherung im Browser')
console.log('[DEBUG] Das ist NORMAL und FUNKTIONIERT ohne Smartphone!')
console.log('[DEBUG] Cross-Device ist nur eine Option, nicht zwingend erforderlich.')
} else {
console.log('[DEBUG] ⚠️ Platform Authenticator ist NICHT verfügbar.')
console.log('[DEBUG] Der Browser könnte Cross-Device verwenden (Smartphone via QR-Code).')
console.log('[DEBUG] Oder einen USB-Sicherheitsschlüssel.')
} }
// Versuche startRegistration aufzurufen // Versuche startRegistration aufzurufen
// Bei Cross-Device wird automatisch ein QR-Code generiert // Mit authenticatorAttachment: 'platform' wird ein lokaler Authenticator verwendet:
// Der Browser sollte eine Verbindung zu Tunnel-Servern aufbauen (cable.ua5v.com, cable.auth.com) // - Browser-eigene Passkey-Speicherung (Chrome Password Manager, Firefox Password Manager, etc.)
// - Windows Hello (biometrisch oder PIN)
// - TouchID auf Mac
// - KEIN Cross-Device (kein Smartphone nötig)
console.log('[DEBUG] Calling startRegistration...') console.log('[DEBUG] Calling startRegistration...')
console.log('[DEBUG] ⚠️ WICHTIG: Prüfe Browser Network-Tab während startRegistration läuft!') console.log('[DEBUG] Konfiguriert für lokale Passkey-Speicherung im Browser')
console.log('[DEBUG] Erwartete Tunnel-Server-Requests:') console.log('[DEBUG] Erwartetes Verhalten:')
console.log('[DEBUG] - cable.ua5v.com (Google Chrome/Edge)') console.log('[DEBUG] - Browser zeigt Dialog für Passkey-Erstellung')
console.log('[DEBUG] - cable.auth.com (Apple Safari)') console.log('[DEBUG] - Passkey wird lokal im Browser gespeichert')
console.log('[DEBUG] - Andere Tunnel-Server (abhängig vom Browser)') console.log('[DEBUG] - KEIN QR-Code (Cross-Device wird nicht verwendet)')
console.log('[DEBUG] Wenn KEINE Tunnel-Requests sichtbar sind:') console.log('[DEBUG] - KEIN Smartphone nötig')
console.log('[DEBUG] → Cross-Device wird NICHT verwendet')
console.log('[DEBUG] → Möglicherweise wird ein lokaler Authenticator verwendet')
console.log('[DEBUG] → Oder der Browser unterstützt Cross-Device nicht')
credential = await mod.startRegistration({ optionsJSON: pre.options }) credential = await mod.startRegistration({ optionsJSON: pre.options })

View File

@@ -102,11 +102,19 @@ export default defineEventHandler(async (event) => {
authenticatorSelection: { authenticatorSelection: {
residentKey: 'preferred', residentKey: 'preferred',
userVerification: 'preferred', userVerification: 'preferred',
// WICHTIG: Für Cross-Device sollte requireResidentKey false sein requireResidentKey: false,
// und authenticatorAttachment nicht auf 'platform' beschränkt sein // WICHTIG: authenticatorAttachment bestimmt, welche Authenticatoren verwendet werden können
// (sonst wird nur lokaler Authenticator verwendet) // - 'platform': Nur lokale Authenticatoren (Windows Hello, TouchID, Browser-eigene Passkey-Speicherung)
requireResidentKey: false // - 'cross-platform': Nur externe Authenticatoren (USB-Schlüssel, Smartphone via Cross-Device)
// authenticatorAttachment nicht setzen = erlaubt sowohl platform als auch cross-platform // - NICHT setzen: Browser entscheidet automatisch (kann lokale ODER Cross-Device verwenden)
//
// Für Browser-eigene Passkey-Speicherung: 'platform' verwenden
// Dies ermöglicht:
// - Browser-eigene Passkey-Speicherung (Chrome Password Manager, Firefox Password Manager, etc.)
// - Windows Hello (biometrisch oder PIN)
// - TouchID auf Mac
// - KEIN Cross-Device (kein Smartphone nötig)
authenticatorAttachment: 'platform' // Lokale Authenticatoren (Browser-eigene Passkey-Speicherung)
}, },
// Timeout erhöhen für Cross-Device (Standard: 60s, hier: 5 Minuten) // Timeout erhöhen für Cross-Device (Standard: 60s, hier: 5 Minuten)
timeout: 300000 timeout: 300000