webauthn
0.2.5, released 2 years ago by flutter.institute
A plugin implementing the WebAuthn authenticator model for generating Public Key Credentials
What it does
Implements the WebAuthn Authenticator model allowing Flutter apps to generate public key credentials, register users using biometrics, and create assertions for login. It uses local_auth and flutter_secure_storage under the hood.
AI-written summary of version 0.2.5, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to implement WebAuthn authenticator functionality in a Flutter application.
- You want to use platform-supported biometrics and secure credential storage for WebAuthn authentication.
Skip it when
- You do not require WebAuthn or platform authenticator capabilities.
- Your Android minSdkVersion is lower than 18.
Strengths
- Implements the WebAuthn Authenticator model with helper methods for Web APIs.
- Integrates with local_auth and flutter_secure_storage.
Weaknesses
- Credential selection during assertions is not yet fully implemented (uses the most recently created credential).
- StrongBox keystore is not fully supported across all Android devices.
Setup
- Kind
- Flutter widgets
- Effort
- Medium
- Code generation
- Yes (build_runner)
- Direct dependencies
- 18
Requires local_auth integration setup for iOS and Android. In build.gradle, minSdkVersion must be set to >= 18 for flutter_secure_storage. Uses build_runner for code generation.
final authenticator = Authenticator(true, true);
final makeCredentialOptions = MakeCredentialOptions.fromJson(options);
final attestation = authenticator.makeCredential(makeCredentialOptions);Works with
Packages commonly used together with webauthn: ones it builds on, ones built on it, and its own family.
- cryptowebauthn depends on itProvides SHA, MD5, and HMAC hashing functions for Dart.
- json_annotationwebauthn depends on itProvides annotations for json_serializable to generate JSON (de)serialization code.
- path_providerwebauthn depends on itProvides Flutter APIs to locate common filesystem directories on Android, iOS, macOS, Linux and Windows.
- equatablewebauthn depends on itProvides value‑based equality for Dart objects without manual == and hashCode.
- flutter_secure_storagewebauthn depends on itSecure key-value storage using platform-specific secure mechanisms
- sqflitewebauthn depends on itSQLite plugin for Flutter supporting iOS, Android and MacOS.
- loggerwebauthn depends on itAn extensible logger for printing formatted logs with levels, custom filters, and printers.
- local_auth_androidwebauthn depends on itAndroid implementation of the local_auth plugin for biometric authentication.