diff --git a/pages/mitgliederbereich/profil.vue b/pages/mitgliederbereich/profil.vue index 75b6a6a..ad2d72c 100644 --- a/pages/mitgliederbereich/profil.vue +++ b/pages/mitgliederbereich/profil.vue @@ -205,6 +205,9 @@
Passkeys erlauben eine Anmeldung ohne Passwort. Je nach Gerät erfolgt die Einrichtung lokal oder über Smartphone/USB-Sicherheitsschlüssel.
++ Hinweis: Unter Firefox wird für maximale Kompatibilität ein externer Authenticator (Smartphone oder USB-Sicherheitsschlüssel) bevorzugt. +
{ const name = window.prompt('Name für den Passkey (z.B. "iPhone", "Laptop"):', 'Passkey') || 'Passkey' const mod = await import('@simplewebauthn/browser') - // localDevice nur setzen, wenn das Gerät wirklich einen Platform-Authenticator hat. + // Firefox auf Linux: externen Authenticator (USB/Smartphone) bevorzugen. + // Chromium: localDevice nur setzen, wenn das Gerät wirklich einen Platform-Authenticator hat. const firefox = isFirefoxBrowser() const platformAvailable = await hasPlatformAuthenticator() - const registrationOptionsRequest = (!firefox && platformAvailable) - ? { method: 'POST', body: { preferredAuthenticatorType: 'localDevice' } } + const preferredAuthenticatorType = firefox + ? 'securityKey' + : (platformAvailable ? 'localDevice' : undefined) + const registrationOptionsRequest = preferredAuthenticatorType + ? { method: 'POST', body: { preferredAuthenticatorType } } : { method: 'POST' } const res = await $fetch('/api/auth/passkeys/registration-options', registrationOptionsRequest)