Skip to content

fix(passkeys_darwin): forward userVerification preference to AuthenticationServices - #309

Merged
spydon merged 6 commits into
mainfrom
fix/darwin-user-verification-preference
Sep 14, 2026
Merged

spydon merged 6 commits into
mainfrom
fix/darwin-user-verification-preference

Conversation

@spydon

@spydon spydon commented Sep 11, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • `register` and `authenticate` on iOS and macOS accepted a user verification preference (`authSelectionType.userVerification` and `AuthenticateRequestType.userVerification`) but never forwarded it, so Apple's default of `preferred` always applied.
  • Adds a `userVerificationPreference` parameter to the darwin Pigeon API and forwards it from the Dart layer.
  • Maps `required`, `preferred` and `discouraged` onto `userVerificationPreference` for the platform and security key registration and assertion requests. Unknown or missing values leave the system default untouched, matching the previous behaviour.
  • Adds unit tests asserting the value is forwarded (and is null when unset) for both operations.

Closes #304

Test plan

  • `melos format --set-exit-if-changed`
  • `flutter analyze --fatal-infos` and `flutter test` in `passkeys_darwin`
  • Typechecked the AuthenticationServices usage against the macOS SDK
  • iOS SwiftPM, CocoaPods and previous Xcode builds via CI (no Xcode on the local machine)

spydon added 6 commits July 16, 2026 20:25
…cationServices

Both register and authenticate accepted a user verification preference but
never handed it to the platform or security key requests, so Apple's default
of preferred always applied. The preference is now passed through Pigeon and
mapped onto userVerificationPreference of all four request types.

Closes #304
@spydon
spydon merged commit 0dc05c9 into main Sep 14, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

userVerificationPreference is not forwarded to OS on darwin plugin

1 participant