-
Notifications
You must be signed in to change notification settings - Fork 28
fix(android): always set Kotlin jvmTarget to 17 #59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
christopherwxyz
wants to merge
7
commits into
peterferguson:main
Choose a base branch
from
officialunofficial:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+2,540
−3,009
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
6319bc5
fix(android): always set Kotlin jvmTarget to 17
christopherwxyz 8164cc2
fix: update lockfile and fix TS webauthn type mismatch
christopherwxyz ae4186e
fix(ios): use platform-only provider for targeted assertions
heavygweit 33e3289
fix(android): enable auto-select when allowCredentials is specified
heavygweit 9250a80
fix(android): bump androidx.credentials to 1.5.0 for auto-select support
heavygweit a94d390
Revert "fix(android): bump androidx.credentials to 1.5.0 for auto-sel…
heavygweit 3473f0e
Revert "fix(android): enable auto-select when allowCredentials is spe…
heavygweit File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🌐 Web query:
Apple ASAuthorizationPlatformPublicKeyCredentialAssertionRequest security key external credentials allowCredentials💡 Result:
In Apple’s passkeys APIs,
ASAuthorizationPlatformPublicKeyCredentialAssertionRequest.allowedCredentialsis the native equivalent of WebAuthnallowCredentials: it lets you restrict an assertion to a specific set of credential IDs (non‑discoverable / “username-first” style sign-in). If you omit it or set it to an empty array, you enable the discoverable (passkey) experience where the system can show an account selector / pick from available passkeys without you pre-supplying credential IDs. [1], [2], [3]Important distinction: platform vs external (security key) credentials
ASAuthorizationPlatformPublicKeyCredentialAssertionRequestis for the platform authenticator (passkeys in iCloud Keychain on Apple devices). [1]ASAuthorizationSecurityKeyPublicKeyCredentialProviderand itsASAuthorizationSecurityKeyPublicKeyCredentialAssertionRequest, which also supports an allow-list viaallowedCredentials(and some bindings expose additional related properties likeSecurityAllowedCredentials). [4]Typical patterns
1) Discoverable passkey sign-in (recommended UX): don’t set
allowedCredentialsOmitting/empty
allowCredentialsis what enables discoverable credential flows in WebAuthn/passkeys. [2], [3]2) Restrict to known credential IDs (allow-list)
This mirrors WebAuthn
allowCredentialsusage. [2], [3]3) External security key assertion: use the security-key provider
Conceptually:
ASAuthorizationSecurityKeyPublicKeyCredentialAssertionRequestallowedCredentialsto the security-key credential descriptors you want to permit (optionally including transport hints), then run it viaASAuthorizationController. [4]Sources: Apple “Supporting passkeys” overview for the platform flow [1], WebAuthn/passkeys behavior of
allowCredentials(omit/empty for discoverable credentials) [2], [3], and the security-key assertion request API surface showingAllowedCredentialsfor security keys [4].🌐 Web query:
Apple AuthenticationServices ASAuthorizationSecurityKeyPublicKeyCredentialAssertionRequest vs platform request💡 Result:
In AuthenticationServices, the assertion request type mainly selects which kind of WebAuthn authenticator you’re targeting:
ASAuthorizationPlatformPublicKeyCredentialAssertionRequest(“platform request”)shouldShowHybridTransport(seen used only on the platform assertion request). [2]ASAuthorizationSecurityKeyPublicKeyCredentialAssertionRequest(“security key request”)ASAuthorizationSecurityKeyPublicKeyCredentialDescriptor) rather than platform descriptors, and does not participate in the platform’s hybrid/passkey-on-phone UX toggles. [3][2]What’s the practical difference in code?
ASAuthorizationPlatformPublicKeyCredentialProvider(...).createCredentialAssertionRequest(challenge:)for platform/passkeys. [1][2]ASAuthorizationSecurityKeyPublicKeyCredentialProvider(...).createCredentialAssertionRequest(challenge:)for external security keys. [2]Common pattern (support both)
Many implementations create both a platform assertion request and a security-key assertion request (same RP ID + challenge), set
allowedCredentialsappropriately for each descriptor type, then pass both toASAuthorizationControllerso the user can choose the authenticator. [2][3]Sources: [1] [2] [3] [4]
🌐 Web query:
WebAuthn allowCredentials attribute effect on authenticator selection💡 Result:
allowCredentials(inPublicKeyCredentialRequestOptionspassed tonavigator.credentials.get()) directly filters which authenticators are eligible by telling the user agent “only these credential IDs are acceptable for this assertion.”allowCredentialsis non-empty: the browser will only let the user complete authentication using an authenticator that can produce an assertion for one of the listed credential IDs (and matching RP ID, etc.). If no available authenticator can satisfy any entry, the ceremony fails (commonly surfaced asNotAllowedError). [1], [2]allowCredentialsis empty (or omitted): it means any credential is acceptable, which enables “username-less” / discoverable credential flows (the authenticator can choose an RP-matching discoverable credential and the browser may show an account picker). [1], [3]transportsinside each allowCredentials entry: are hints the platform can use to decide which authenticators could work (e.g., “internal” vs “usb/nfc/ble”), potentially avoiding presenting options that can’t satisfy the request. [2]Practical effect on authenticator selection:
allowCredentialswhen you already know the user (e.g., after username entry) to constrain authentication to that account’s registered credentials. [3]Sources:
[1] MDN:
PublicKeyCredentialRequestOptions.allowCredentials(restriction + empty array meaning “any credential”) (developer.mozilla.org)[2] W3C WebAuthn Level 2: ineligible authenticators +
transportshint and “no eligible credential” failure behavior (w3.org)[3] W3C WebAuthn Level 3: definition/purpose of
allowCredentials(“find authenticators eligible…”, recommended when account identified) (w3.org)Citations:
Functional regression: non-empty
allowCredentialsprevents security-key authentication.When
allowCredentialsis non-empty, the code now creates only a platform assertion request. If theallowCredentialslist contains a credential ID registered to an external/security-key authenticator, that authenticator cannot fulfill the assertion—the platform request cannot produce a valid assertion for security-key credentials. This causesNotAllowedError.Fix: Always provide both platform and security-key assertion requests when
allowCredentialsis set. SetallowedCredentialson each request type with appropriate descriptors, allowing either authenticator type to satisfy the credentials in the allow-list. Only use platform-only or security-key-only paths if there is explicit, verifiable information about which authenticator types the credentials belong to.🤖 Prompt for AI Agents