Skip to content

PlatformException(NotAvailable, Security credentials not available., null, null) with android 10 #94538

@ADLsourceCode

Description

@ADLsourceCode

PlatformException(NotAvailable, Security credentials not available., null, null) with android 10
when Biometric Hardware is not available but faceid and pin is available and Pin is enabled by default.

its works well with android 8.

Below is the code i am using:-


 const iosStrings = const IOSAuthMessages(
        cancelButton: 'cancel',
        goToSettingsButton: 'settings',
        goToSettingsDescription: 'Please set up your Touch ID.',
        lockOut: 'Please re-enable your Touch ID');

     const androidStrings = AndroidAuthMessages(
      cancelButton: 'cancel',
      goToSettingsButton: 'settings',
      goToSettingsDescription: 'Please set up your Touch ID.',
      signInTitle: 'User Authorization Required',
    );


    // if(canCheckBiometrics) {
    //   if(availableBiometics.length > 0) {
        try {
          authenticated = await auth.authenticate(
            localizedReason: 'Please authenticate to proceed',
            useErrorDialogs: true,
            biometricOnly: false,
            stickyAuth: true,
            iOSAuthStrings: iosStrings,
            androidAuthStrings: androidStrings,
            sensitiveTransaction: true,
          );
        }  catch (e) {
          print(e);
          Toast.show("Error authenticating : "+e.toString(),context,duration:3,gravity: Toast.center);
        }
        if (!mounted) return;
        if (authenticated) {
          setState(() {
            isFingerprint = true;
          });
        }
        else{
          // setState(() {
          //   isFingerprint = true;
          // });
          print(authenticated);
          Toast.show("Authentication Failed",context,duration:2,gravity: Toast.center);
        }

Metadata

Metadata

Assignees

No one assigned

    Labels

    in triagePresently being triaged by the triage teamwaiting for customer responseThe Flutter team cannot make further progress on this issue until the original reporter responds

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions