The passkeys bridge lets the page create and use passkeys with the platform authenticator. A WebView page served from
loopback can’t use navigator.credentials for your site, because its origin is http://127.0.0.1, not your domain. The
bridge hands the ceremony to the native app instead. It ships in Shiny.AppDeviceBridge.Maui, next to the device and
sensors bridges, and is built on the passkeys API in .NET MAUI 11 Essentials
(Microsoft.Maui.Authentication.Passkeys).
The page acts as the go-between. It fetches the WebAuthn options from your relying party server, passes them to the
bridge untouched, and posts the response back for the server to verify. The bridge never creates challenges and never
verifies anything. That stays on your server, as it would in a browser.
Pass every relying party id the page will use, or call AddPasskeysBridge again to add more. Options for any other id
are refused with 403 rp_not_allowed before the authenticator is involved. An id is the site’s host name
(example.com), not a URL.
Each relying party must also list the app:
iOS and Mac Catalyst: add the associated domain webcredentials:example.com to the app’s entitlements, and the
app’s id to the site’s /.well-known/apple-app-site-association under webcredentials.
Android: add the app’s package name and signing certificate fingerprint to the site’s
/.well-known/assetlinks.json with the delegate_permission/common.get_login_creds relation.
Windows: nothing.
Without the association, the platform refuses the ceremony and the bridge answers 409 failed with its message.
In Blazor, register AddPasskeysBridgeClient() and inject IPasskeysBridge, both in Shiny.AppDeviceBridge.Client. Options and Response are
JsonElement, so the server’s JSON passes through without a model of its own.
A page that also runs in a browser can check getStatus() and use navigator.credentials when it isn’t hosted.
POST passkeys/create takes the server’s PublicKeyCredentialCreationOptions as options and shows the native “create a
passkey” sheet. The options must carry rp.id. It answers with the new credential’s id (base64url) and response, the
WebAuthn registration response JSON for your server.
POST passkeys/assert takes the server’s PublicKeyCredentialRequestOptions as options. They must carry rpId,
because there’s no page origin to default it from. It answers with the credential id, the userHandle the server set
as user.id at registration (for username-less sign-in; null when the authenticator doesn’t return one), and
response, the WebAuthn authentication response JSON.
Both take preferImmediatelyAvailable. It keeps the ceremony on this device, with no QR code or “use another device”
step: registration happens only if the local authenticator can do it, and sign-in offers only passkeys already on the
device. Apple and Android honor it; Windows ignores it.
Aborting the request (an AbortSignal, or a cancelled token in C#) cancels the ceremony.
Registers a new passkey through the native "create a passkey" sheet. Fails with 400 when the options have no rp.id, 403 rp_not_allowed when the app did not register that id, 409 cancelled when the user dismisses the sheet, and 409 failed when the ceremony fails — most often a missing associated domain (Apple) or Digital Asset Links file (Android) for the relying party.
The relying party server's PublicKeyCredentialCreationOptions JSON, passed through as it came.
preferImmediatelyAvailable
boolean
Stay on this device: only create the passkey if the local authenticator can, with no QR code or "use another device" step. Apple and Android; ignored on Windows.
Signs in with an existing passkey through the native sheet. Fails like create; the options must carry rpId, and 409 failed also covers no matching passkey on the device.
The relying party server's PublicKeyCredentialCreationOptions JSON, passed through as it came.
preferImmediatelyAvailable?
boolean
Stay on this device: only create the passkey if the local authenticator can, with no QR code or "use another device" step. Apple and Android; ignored on Windows.