Skip to content

feat(passkeys): add PRF support for iOS and Android#263

Merged
spydon merged 18 commits into
mainfrom
thomas/prf-resolved
Jul 15, 2026
Merged

feat(passkeys): add PRF support for iOS and Android#263
spydon merged 18 commits into
mainfrom
thomas/prf-resolved

Conversation

@spydon

@spydon spydon commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

Adds PRF (pseudo-random function) extension support for iOS and Android passkeys.

This is a continuation of #226 by @Tr736, rebranched to thomas/prf-resolved so the conflicts with main could be resolved (the original PR is from an organization-owned fork, which blocks maintainer pushes). The original commit history is preserved.

Conflict resolution notes

  • Adopted main's package versions, SDK/Flutter constraints, and internal dependency version constraints (melos resolves local paths via overrides), dropping the branch's local path: dependencies, publish_to: none, and resolution: workspace.
  • Followed main in removing MinimumOSVersion from the example's AppFrameworkInfo.plist (deployment target is managed in project.pbxproj).
  • Took main's authenticator_selection generated code, matching the #254 defaults already present in the source.

Supersedes #226.

Tr736 and others added 13 commits January 30, 2026 12:18
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
spydon added 5 commits July 15, 2026 13:58
# 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
@spydon spydon merged commit 906a506 into main Jul 15, 2026
2 of 4 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.

2 participants