Skip to content

[local_auth] on Windows, with only password enabled, authenticate returns NoHardware #173506

@hhanh00

Description

@hhanh00

Steps to reproduce

  1. Use authenticate on windows but do not set a PIN, or Windows Hello

authenticate returns "NoHardware" which is not one of the defined error codes.

Expected results

Return one of the auth_error enum values.

Actual results

Got "NoHardware"

Code sample

Code sample
    final didAuthenticate = await auth.authenticate(
        localizedReason: reason ?? "Authenticate to continue",
        options: const AuthenticationOptions(useErrorDialogs: false));

Screenshots or Video

Screenshots / Video demonstration

[Upload media here]

Logs

Logs
[Paste your logs here]

Flutter Doctor output

Doctor output
[✓] Flutter (Channel stable, 3.32.8, on macOS 15.6 24G84 darwin-arm64, locale en-US) [477ms]
    • Flutter version 3.32.8 on channel stable at /Users/hanhhuynhhuu/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision edada7c56e (2 weeks ago), 2025-07-25 14:08:03 +0000
    • Engine revision ef0cd00091
    • Dart version 3.8.1
    • DevTools version 2.45.1

[!] Android toolchain - develop for Android devices (Android SDK version 35.0.0) [2.6s]
    • Android SDK at /Users/hanhhuynhhuu/Android/sdk
    • Platform android-35, build-tools 35.0.0
    • ANDROID_HOME = /Users/hanhhuynhhuu/Android/sdk
    • Java binary at: /opt/homebrew/opt/openjdk@17/bin/java
      This JDK is specified by the JAVA_HOME environment variable.
      To manually set the JDK path, use: `flutter config --jdk-dir="path/to/jdk"`.
    • Java version OpenJDK Runtime Environment Homebrew (build 17.0.13+0)
    ! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses

[✓] Xcode - develop for iOS and macOS (Xcode 16.1) [1,881ms]
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 16B40
    • CocoaPods version 1.16.2

[✓] Chrome - develop for the web [8ms]
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[!] Android Studio (not installed) [8ms]
    • Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/to/macos-android-setup for detailed instructions).

[✓] VS Code (version 1.102.3) [8ms]
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.116.0

[✓] Connected device (2 available) [6.2s]
    • macOS (desktop) • macos  • darwin-arm64   • macOS 15.6 24G84 darwin-arm64
    • Chrome (web)    • chrome • web-javascript • Google Chrome 138.0.7204.184

[✓] Network resources [1,391ms]
    • All expected network resources are available.

! Doctor found issues in 2 categories.

The app is built on a github runner. Please disregard the MacOS reference.

Metadata

Metadata

Labels

P2Important issues not at the top of the work listp: local_authPlugin for local authentificationpackageflutter/packages repository. See also p: labels.platform-windowsBuilding on or for Windows specificallyr: fixedIssue is closed as already fixed in a newer versionteam-ecosystemOwned by Ecosystem teamtriaged-ecosystemTriaged by Ecosystem team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions