Skip to content
pubscout

webauthn

0.2.5, released 2 years ago by flutter.institute

A plugin implementing the WebAuthn authenticator model for generating Public Key Credentials

$ flutter pub add webauthn
Source repository

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.