Plugin.Fingerprint.MAUI 2.0.1

dotnet add package Plugin.Fingerprint.MAUI --version 2.0.1
                    
NuGet\Install-Package Plugin.Fingerprint.MAUI -Version 2.0.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Plugin.Fingerprint.MAUI" Version="2.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Plugin.Fingerprint.MAUI" Version="2.0.1" />
                    
Directory.Packages.props
<PackageReference Include="Plugin.Fingerprint.MAUI" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Plugin.Fingerprint.MAUI --version 2.0.1
                    
#r "nuget: Plugin.Fingerprint.MAUI, 2.0.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Plugin.Fingerprint.MAUI@2.0.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Plugin.Fingerprint.MAUI&version=2.0.1
                    
Install as a Cake Addin
#tool nuget:?package=Plugin.Fingerprint.MAUI&version=2.0.1
                    
Install as a Cake Tool

Biometric / Fingerprint plugin for Maui

Maui and MvvMCross plugin for accessing the fingerprint, Face ID or other biometric sensors.

Setup

iOS

Add NSFaceIDUsageDescription to your Info.plist to describe the reason your app uses Face ID. (see Documentation). Otherwise the App will crash when you start a Face ID authentication on iOS 11.3+.

<key>NSFaceIDUsageDescription</key>
<string>Need your face to unlock secrets!</string>

Android

Request the permission in AndroidManifest.xml

<uses-permission android:name="android.permission.USE_BIOMETRIC" />
<uses-permission android:name="android.permission.USE_FINGERPRINT" />

Set the resolver of the current Activity Skip this, if you use the MvvMCross Plugin or don't use the dialog. MAUI apps have a single Activity. Wire it up in MainActivity.cs:

using Android.App;
using Android.OS;
using Microsoft.Maui;
using Plugin.Fingerprint;

namespace YourApp;

[Activity(Theme = "@style/Maui.SplashTheme", MainLauncher = true)]
public class MainActivity : MauiAppCompatActivity
{
    protected override void OnCreate(Bundle? savedInstanceState)
    {
        base.OnCreate(savedInstanceState);

        // Required — the plugin uses the Activity to show BiometricPrompt.
        CrossFingerprint.SetCurrentActivityResolver(() => this);
    }
}

Windows

Add the capability inside Package.appxmanifest:

<Capabilities>
    <DeviceCapability Name="fingerprint" />
</Capabilities>

MAUI Program Setup

Register the plugin with MAUI’s DI container (skip if using MvvmCross — Plugin.cs Load() handles registration):

using Microsoft.Extensions.DependencyInjection;
using Microsoft.Maui.Controls.Hosting;
using Microsoft.Maui.Hosting;
using Plugin.Fingerprint;
using Plugin.Fingerprint.Abstractions;

namespace YourApp;

public static class MauiProgram
{
    public static MauiApp CreateMauiApp()
    {
        var builder = MauiApp.CreateBuilder();

        builder
            .UseMauiApp<App>()
            .ConfigureFonts(fonts =>
            {
                fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
            });

        // Register IFingerprint as a singleton so it can be injected into ViewModels.
        builder.Services.AddSingleton<IFingerprint>(_ => CrossFingerprint.Current);

        return builder.Build();
    }
}

Usage

Example

vanilla
var request = new AuthenticationRequestConfiguration ("Prove you have fingers!", "Because without it you can't have access");
var result = await CrossFingerprint.Current.AuthenticateAsync(request);
if (result.Authenticated)
{
    // do secret stuff :)
}
else
{
    // not allowed to do secret stuff :(
}
using MvvMCross
var fpService = Mvx.Resolve<IFingerprint>(); // or use dependency injection and inject IFingerprint

var request = new AuthenticationRequestConfiguration ("Prove you have mvx fingers!", "Because without it you can't have access");
var result = await fpService.AuthenticateAsync(request);
if (result.Authenticated)
{
    // do secret stuff :)
}
else
{
    // not allowed to do secret stuff :(
}

Using MAUI with Dependency Injection

Inject IFingerprint into a ViewModel:

using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using Plugin.Fingerprint.Abstractions;

namespace YourApp.ViewModels;

public partial class LoginViewModel : ObservableObject
{
    private readonly IFingerprint _fingerprint;

    public LoginViewModel(IFingerprint fingerprint)
    {
        _fingerprint = fingerprint;
    }

    [RelayCommand]
    async Task AuthenticateAsync()
    {
        var config = new AuthenticationRequestConfiguration(
            title:  "Verify your identity",
            reason: "Authenticate to access your account")
        {
            CancelTitle = "Cancel",
            FallbackTitle = "Use PIN",
            AllowAlternativeAuthentication = true,
        };

        var availability = await _fingerprint.GetAvailabilityAsync(
            allowAlternativeAuthentication: config.AllowAlternativeAuthentication);

        if (availability != FingerprintAvailability.Available)
        {
            await Shell.Current.DisplayAlert("Unavailable",
                $"Biometric auth not available: {availability}", "OK");
            return;
        }

        var result = await _fingerprint.AuthenticateAsync(config);

        if (result.Authenticated)
        {
            // success — navigate or unlock
        }
        else
        {
            await Shell.Current.DisplayAlert("Failed",
                result.ErrorMessage ?? result.Status.ToString(), "OK");
        }
    }
}

Nice to know

Android code shrinker (Proguard & r8)

If you use the plugin with Link all, Release Mode and ProGuard/r8 enabled, you may have to do the following:

  1. Create a proguard.cfg file in your android project and add the following:
    -dontwarn com.samsung.**
    -keep class com.samsung.** {*;}
  1. Include it to your project
  2. Properties > Build Action > ProguardConfiguration
Product Compatible and additional computed target framework versions.
.NET net10.0-android36.0 is compatible.  net10.0-ios26.0 is compatible.  net10.0-maccatalyst26.0 is compatible.  net10.0-windows10.0.19041 is compatible.  net11.0-android36.1 is compatible.  net11.0-ios26.4 is compatible.  net11.0-maccatalyst26.4 is compatible.  net11.0-windows10.0.19041 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0-android36.0

  • net10.0-ios26.0

    • No dependencies.
  • net10.0-maccatalyst26.0

    • No dependencies.
  • net10.0-windows10.0.19041

    • No dependencies.
  • net11.0-android36.1

  • net11.0-ios26.4

    • No dependencies.
  • net11.0-maccatalyst26.4

    • No dependencies.
  • net11.0-windows10.0.19041

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.0.1 37 6/5/2026
2.0.0 41 6/5/2026
1.0.0 43 6/5/2026