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
// Wenn ja, wird möglicherweise kein Cross-Device verwendet
if (platformAuthAvailable) {
console.warn('[DEBUG] ⚠️ WARNUNG: Platform Authenticator ist verfügbar!')
console.warn('[DEBUG] Der Browser könnte einen lokalen Authenticator verwenden (Windows Hello, TouchID)')
console.warn('[DEBUG] statt Cross-Device. Prüfe, ob ein QR-Code erscheint oder ein lokaler Dialog.')
console.log('[DEBUG] Platform Authenticator ist verfügbar!')
console.log('[DEBUG] Der Browser wird wahrscheinlich einen lokalen Authenticator verwenden:')
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
// Bei Cross-Device wird automatisch ein QR-Code generiert
// Der Browser sollte eine Verbindung zu Tunnel-Servern aufbauen (cable.ua5v.com, cable.auth.com)
// Mit authenticatorAttachment: 'platform' wird ein lokaler Authenticator verwendet:
// - 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] ⚠️ WICHTIG: Prüfe Browser Network-Tab während startRegistration läuft!')
console.log('[DEBUG] Erwartete Tunnel-Server-Requests:')
console.log('[DEBUG] - cable.ua5v.com (Google Chrome/Edge)')
console.log('[DEBUG] - cable.auth.com (Apple Safari)')
console.log('[DEBUG] - Andere Tunnel-Server (abhängig vom Browser)')
console.log('[DEBUG] Wenn KEINE Tunnel-Requests sichtbar sind:')
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')
console.log('[DEBUG] Konfiguriert für lokale Passkey-Speicherung im Browser')
console.log('[DEBUG] Erwartetes Verhalten:')
console.log('[DEBUG] - Browser zeigt Dialog für Passkey-Erstellung')
console.log('[DEBUG] - Passkey wird lokal im Browser gespeichert')
console.log('[DEBUG] - KEIN QR-Code (Cross-Device wird nicht verwendet)')
console.log('[DEBUG] - KEIN Smartphone nötig')
credential = await mod.startRegistration({ optionsJSON: pre.options })

View File

@@ -102,11 +102,19 @@ export default defineEventHandler(async (event) => {
authenticatorSelection: {
residentKey: 'preferred',
userVerification: 'preferred',
// WICHTIG: Für Cross-Device sollte requireResidentKey false sein
// und authenticatorAttachment nicht auf 'platform' beschränkt sein
// (sonst wird nur lokaler Authenticator verwendet)
requireResidentKey: false
// authenticatorAttachment nicht setzen = erlaubt sowohl platform als auch cross-platform
requireResidentKey: false,
// WICHTIG: authenticatorAttachment bestimmt, welche Authenticatoren verwendet werden können
// - 'platform': Nur lokale Authenticatoren (Windows Hello, TouchID, Browser-eigene Passkey-Speicherung)
// - 'cross-platform': Nur externe Authenticatoren (USB-Schlüssel, Smartphone via Cross-Device)
// - 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: 300000