Aktualisiere Hinweise zur Verwendung von Authenticatoren in Firefox und passe die bevorzugte Authenticator-Typen für die Passkey-Registrierung an.
This commit is contained in:
@@ -206,7 +206,7 @@
|
|||||||
Passkeys erlauben eine Anmeldung ohne Passwort. Je nach Gerät erfolgt die Einrichtung lokal oder über Smartphone/USB-Sicherheitsschlüssel.
|
Passkeys erlauben eine Anmeldung ohne Passwort. Je nach Gerät erfolgt die Einrichtung lokal oder über Smartphone/USB-Sicherheitsschlüssel.
|
||||||
</p>
|
</p>
|
||||||
<p class="text-xs text-gray-500 mb-4">
|
<p class="text-xs text-gray-500 mb-4">
|
||||||
Hinweis: Unter Firefox wird für maximale Kompatibilität ein externer Authenticator (Smartphone oder USB-Sicherheitsschlüssel) bevorzugt.
|
Hinweis: Unter Firefox wird der Smartphone-Authenticator (QR/Hybrid) bevorzugt.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p
|
<p
|
||||||
@@ -419,12 +419,12 @@ const addPasskey = async () => {
|
|||||||
const name = window.prompt('Name für den Passkey (z.B. "iPhone", "Laptop"):', 'Passkey') || 'Passkey'
|
const name = window.prompt('Name für den Passkey (z.B. "iPhone", "Laptop"):', 'Passkey') || 'Passkey'
|
||||||
const mod = await import('@simplewebauthn/browser')
|
const mod = await import('@simplewebauthn/browser')
|
||||||
|
|
||||||
// Firefox auf Linux: externen Authenticator (USB/Smartphone) bevorzugen.
|
// Firefox auf Linux: Smartphone-Flow (Hybrid/QR) bevorzugen.
|
||||||
// Chromium: localDevice nur setzen, wenn das Gerät wirklich einen Platform-Authenticator hat.
|
// Chromium: localDevice nur setzen, wenn das Gerät wirklich einen Platform-Authenticator hat.
|
||||||
const firefox = isFirefoxBrowser()
|
const firefox = isFirefoxBrowser()
|
||||||
const platformAvailable = await hasPlatformAuthenticator()
|
const platformAvailable = await hasPlatformAuthenticator()
|
||||||
const preferredAuthenticatorType = firefox
|
const preferredAuthenticatorType = firefox
|
||||||
? 'securityKey'
|
? 'remoteDevice'
|
||||||
: (platformAvailable ? 'localDevice' : undefined)
|
: (platformAvailable ? 'localDevice' : undefined)
|
||||||
const registrationOptionsRequest = preferredAuthenticatorType
|
const registrationOptionsRequest = preferredAuthenticatorType
|
||||||
? { method: 'POST', body: { preferredAuthenticatorType } }
|
? { method: 'POST', body: { preferredAuthenticatorType } }
|
||||||
|
|||||||
Reference in New Issue
Block a user