feat: add PasskeyAuthenticatorInterface implemented by PasskeyAuthenticator#247
Merged
spydon merged 3 commits intoJun 29, 2026
Merged
Conversation
…icator Add a `PasskeyAuthenticatorInterface` to `passkeys_platform_interface` declaring the `register` and `authenticate` ceremony methods, and have the `passkeys` package's `PasskeyAuthenticator` implement it. This lets packages accept an authenticator while depending only on `passkeys_platform_interface`, without taking on the full `passkeys` plugin and its platform requirements. The interface signatures match the existing `PasskeyAuthenticator` methods, so implementing it is non-breaking.
spydon
added a commit
to supabase/supabase-flutter
that referenced
this pull request
Jun 29, 2026
…f depending on passkeys (#1444) ## What Removes the direct dependency on the [`passkeys`](https://pub.dev/packages/passkeys) plugin. `supabase_flutter` now depends only on [`passkeys_platform_interface`](https://pub.dev/packages/passkeys_platform_interface) and the experimental passkey methods accept a `PasskeyAuthenticatorInterface`: ```dart import 'package:passkeys/authenticator.dart'; final authenticator = PasskeyAuthenticator(); await supabase.auth.signInWithPasskey(authenticator); await supabase.auth.registerPasskey(authenticator); ``` ## Why `supabase_flutter` only needs the WebAuthn request/response types and the two ceremony methods. Bundling the full `passkeys` plugin 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: ^2.7.0`. - `registerPasskey` / `signInWithPasskey` take a `PasskeyAuthenticatorInterface`. Both are `@experimental`, so no major version bump. - `passkey_options_mapper.dart`: imports types from `passkeys_platform_interface`. - Removed the now-unnecessary `device_info_plus` `dependency_overrides` in the example (verified the example no longer pulls `passkeys`/`device_info_plus` when the local package is linked). - Updated the README passkeys section, including the `passkeys >=2.21.0` floor consumers need for `PasskeyAuthenticator` to implement the interface. ## Upstream dependency (now published) This builds on **corbado/flutter-passkeys#247**, which adds `PasskeyAuthenticatorInterface` to `passkeys_platform_interface` and makes `passkeys`'s `PasskeyAuthenticator` implement it. Both changes are non-breaking for those packages (the method signatures already match exactly, so `implements` only adds a supertype). That PR is merged and the packages are published: - `passkeys_platform_interface` **2.7.0** carries the interface (pinned here). - `passkeys` **2.21.0** is the first release whose `PasskeyAuthenticator` implements it; that is the documented floor for consumers. ## Verification - `flutter pub get` resolves `passkeys_platform_interface` to the published `2.7.0`. - `flutter analyze` clean on the changed sources. - Mapper and package tests pass.
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
Adds a
PasskeyAuthenticatorInterfacetopasskeys_platform_interfaceand makes thepasskeyspackage'sPasskeyAuthenticatorimplement it.The interface is re-exported from
passkeys_platform_interface.dart.Why
Packages that integrate passkeys (for example Supabase's
supabase_flutter) often only need to hand aRegisterRequestType/AuthenticateRequestTypeto an authenticator and read back the response. To do that today they must depend on the fullpasskeysplugin, which forces every consumer of their package to raise minimum platform versions (iOS 16.0 / macOS 13.5) and pull in the plugin's transitive dependencies, even when passkeys are never used.With this interface, such a package can depend only on
passkeys_platform_interfaceand accept aPasskeyAuthenticatorInterface. Apps that want passkeys add thepasskeysplugin themselves and pass theirPasskeyAuthenticatorstraight in; apps that do not are unaffected.Non-breaking
PasskeyAuthenticator.registerand.authenticatealready have exactly the signatures the interface declares, soimplementsonly adds a supertype. No method, behavior, or public-API changes.Notes
passkeys_platform_interfaceconstraint bump are left to the Melos release tooling.flutter analyzepasses for both packages (theimplementsclause resolves cleanly, confirming the class satisfies the interface). The only analyzer output is pre-existinginfo-level lints in unrelated files.Happy to adjust naming, file location, or whether the interface should also be re-exported from
passkeys/types.dartto match your preferences.