fix(ios): create() presents both providers when authenticatorAttachment is unset (like get()) - #67
Open
enda-kelly wants to merge 1 commit into
Open
Conversation
…nt is unset Match get(): submit both the platform and the security-key registration requests to one ASAuthorizationController when the request does not pin authenticatorAttachment, so iOS shows a combined sheet. A pinned attachment keeps the single-provider behaviour.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughiOS registration now selects platform and cross-platform providers independently. When no attachment is specified, both eligible requests are combined in one authorization controller. ChangesiOS registration provider selection
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related issues
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
enda-kelly
marked this pull request as ready for review
August 5, 2026 22:08
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
On iOS,
create()(registration) presents a single authenticator provider.get()(authentication) presents both. Because of this, an app can offer a security key at sign-in but not
when a user adds a passkey.
This change makes
create()mirrorget(). When the request does not setauthenticatorAttachment,it submits both the platform request and the security-key request to one
ASAuthorizationController.iOS then shows a combined sheet, so the user can register a platform passkey or a security key. This
matches
navigator.credentials.create()on the web. When the request sets an attachment (platformor
cross-platform), the behaviour does not change.The credential building already exists.
prepareCrossPlatformRegistrationRequest(...)already mapspubKeyCredParams,residentKey,userVerification,attestation, andexcludeCredentials. Sothis is only a control-flow change.
Tested on a device
I built an app with this change and ran it on a device (iOS 26.5.2, Expo SDK 57).
create()with nopinned attachment shows a combined registration sheet. A YubiKey 5 FIPS enrols end to end (PIN and
touch) over USB-C.
ASAuthorizationControlleraccepts two registration requests, as it already doesfor assertions.
Compatibility
Behaviour change: apps that send no
authenticatorAttachmentwill start to show security-key optionsat registration, where today they get a platform-only sheet. This matches the web default, but it is
visible. A minor release with a changelog note is probably appropriate.
Android is not affected. Credential Manager presents the provider choice itself.
Related: #34 (
navigator.credentials.get/createAPI parity), and #68 (the lone-request non-completion that presenting both providers avoids).Summary by CodeRabbit