refactor(supabase_flutter): accept PasskeyAuthenticatorInterface instead of depending on passkeys#1444
Draft
spydon wants to merge 3 commits into
Draft
refactor(supabase_flutter): accept PasskeyAuthenticatorInterface instead of depending on passkeys#1444spydon wants to merge 3 commits into
spydon wants to merge 3 commits into
Conversation
…tead of passkeys Drop the direct dependency on the `passkeys` plugin and depend only on `passkeys_platform_interface` for the WebAuthn request/response types. The experimental `registerPasskey` and `signInWithPasskey` methods now take the ceremony callback as a parameter, so consumers supply their own authenticator (for example `PasskeyAuthenticator.register` / `.authenticate` from the `passkeys` plugin). Apps that do not use passkeys are no longer forced to raise their minimum platform versions or pull in the plugin's transitive dependencies.
grdsdev
approved these changes
Jun 22, 2026
Collaborator
|
Would it be possible to just pass the |
Contributor
Author
That was my first idea too, but unfortunately not, since |
Switch the experimental passkey methods to accept a `PasskeyAuthenticatorInterface` from `passkeys_platform_interface` instead of register/authenticate callbacks, so consumers can pass an authenticator instance directly. Requires an upstream release of `passkeys_platform_interface` that defines the interface and of `passkeys` whose `PasskeyAuthenticator` implements it. The version floor is a placeholder until those are published.
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
Removes the direct dependency on the
passkeysplugin.supabase_flutternow depends only onpasskeys_platform_interfaceand the experimental passkey methods accept aPasskeyAuthenticatorInterface:Why
supabase_flutteronly needs the WebAuthn request/response types and the two ceremony methods. Bundling the fullpasskeysplugin forced every app, even ones that never touch passkeys, to raise minimum platform versions to iOS 16.0 / macOS 13.5 and pull in transitive deps (passkeys_doctor→device_info_plus). Depending on the platform interface and accepting an authenticator instance removes that.How
pubspec.yaml:passkeys→passkeys_platform_interface.registerPasskey/signInWithPasskeytake aPasskeyAuthenticatorInterface. Both are@experimental, so no major version bump.passkey_options_mapper.dart: imports types frompasskeys_platform_interface.device_info_plusdependency_overridesin the example (verified the example no longer pullspasskeys/device_info_pluswhen the local package is linked).Upstream change required (blocks this PR)
This depends on corbado/flutter-passkeys#247, which adds
PasskeyAuthenticatorInterfacetopasskeys_platform_interfaceand makespasskeys'sPasskeyAuthenticatorimplement it. Both changes are non-breaking for those packages (the method signatures already match exactly, soimplementsonly adds a supertype).Once that PR is merged and published, the version floor here (
passkeys_platform_interface: ^2.7.0is a placeholder) will be pinned to the actual release, and a documentedpasskeys: >=<version>floor added for consumers.Verification
supabase_fluttercompiles and tests pass against a local copy ofpasskeys_platform_interfacecarrying the proposed interface (flutter analyzeclean, mapper tests pass).passkeys_platform_interfaceversion is published.