feat(passkeys): add PRF support for iOS and Android#263
Merged
Conversation
add prf in response Support prf Add PRF support to both android and iOS support prf for authenticate auth support
Add PRF support for iOS & Android
# Conflicts: # packages/corbado_auth/pubspec.yaml # packages/passkeys/passkeys/example/ios/Flutter/AppFrameworkInfo.plist # packages/passkeys/passkeys/pubspec.yaml # packages/passkeys/passkeys_android/pubspec.yaml # packages/passkeys/passkeys_platform_interface/lib/types/authenticator_selection.g.dart # packages/passkeys/passkeys_platform_interface/pubspec.yaml
# Conflicts: # packages/passkeys/passkeys/lib/authenticator.dart
- Move the PRF salt from a parallel platform-method parameter onto RegisterRequestType/AuthenticateRequestType so it reaches the public PasskeyAuthenticator API and the platform interface stays single-arg - Fix iOS 18+ hang where a nil salt returned early from register/authenticate before the request was built or the completion called - Deliver the real PRF output via the in-memory clientExtensionResults and stop emitting a hardcoded empty result; keep the secret out of the relying-party JSON (register signals prf.enabled) - Standardize the PRF salt/result encoding on base64url across iOS and Android - Fix the throwing Map<String, Object> cast, remove Android debug logging and the unused hex helpers
- Request types: prf parsed from extensions.prf.eval.first and round-tripped through toJson - Response types: clientExtensionResults read from JSON, and toJson keeps the PRF secret out of the relying-party payload (register signals prf.enabled) - Darwin/Android: register and authenticate forward the PRF salt to the native API and map clientExtensionResults back, with a null salt when prf is unset
# Conflicts: # packages/passkeys/passkeys_android/lib/messages.g.dart # packages/passkeys/passkeys_android/lib/passkeys_android.dart # packages/passkeys/passkeys_android/pigeons/messages.dart # packages/passkeys/passkeys_darwin/lib/messages.g.dart # packages/passkeys/passkeys_darwin/lib/passkeys_darwin.dart # packages/passkeys/passkeys_platform_interface/lib/method_channel_passkeys.dart # packages/passkeys/passkeys_platform_interface/lib/types/authenticate_request.dart # packages/passkeys/passkeys_platform_interface/lib/types/authenticate_response.dart # packages/passkeys/passkeys_platform_interface/lib/types/pubkeycred_param.g.dart # packages/passkeys/passkeys_platform_interface/lib/types/register_request.dart # packages/passkeys/passkeys_platform_interface/lib/types/register_response.dart # packages/passkeys/passkeys_windows/lib/messages.g.dart
- Add macOS 15.0 to the PRF availability checks so passkeys_darwin still compiles for macOS (the APIs are macOS 15+, previously only iOS-gated) - iOS registration now reports prf.enabled (via isSupported) even when the authenticator returns no PRF output - Android: capture prf.enabled and only surface results.first when actually present (no empty-string fallback), shared across register and authenticate - Strengthen PRF tests: assert the in-memory PRF value round-trips, and cover enabled-only and no-prf client extension results
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.
Adds PRF (pseudo-random function) extension support for iOS and Android passkeys.
This is a continuation of #226 by @Tr736, rebranched to
thomas/prf-resolvedso the conflicts withmaincould be resolved (the original PR is from an organization-owned fork, which blocks maintainer pushes). The original commit history is preserved.Conflict resolution notes
main's package versions, SDK/Flutter constraints, and internal dependency version constraints (melos resolves local paths via overrides), dropping the branch's localpath:dependencies,publish_to: none, andresolution: workspace.mainin removingMinimumOSVersionfrom the example'sAppFrameworkInfo.plist(deployment target is managed inproject.pbxproj).main'sauthenticator_selectiongenerated code, matching the#254defaults already present in the source.Supersedes #226.