Giter Site home page Giter Site logo

gongqinjing / local_auth_device_credentials Goto Github PK

View Code? Open in Web Editor NEW

This project forked from yourfriendken/local_auth_device_credentials

0.0 0.0 0.0 113.6 MB

License: BSD 3-Clause "New" or "Revised" License

Java 38.30% Shell 0.93% Ruby 4.73% Objective-C 15.05% Dart 40.98%

local_auth_device_credentials's Introduction

local_auth with device credential option

This is a fork of the local_auth

There is an open Pull Request to merge into bases local_auth package.

Addresses issue: #49703

Device credentials

The original plugin only supports biometric authentication. This package add a method that allows for device credentials if biometric authentication is not available.

localAuth.authenticate() behaves the same as the original plugin's localAuth.authenticateWithBiometrics() but also allows device credentials (pin, pattern, passcode) to be use.

Check if device supports

final LocalAuthentication auth = LocalAuthentication();

// API 23 and up with security features enabled for Android
// Any iOS device
bool isSupported = await auth.isDeviceSupported();

Authenticate by any means

final LocalAuthentication auth = LocalAuthentication();

authenticated = await auth.authenticate(
    localizedReason: 'Let OS determine authentication method',
    useErrorDialogs: true,
    stickyAuth: true);

Check biometrics

final LocalAuthentication auth = LocalAuthentication();

bool isBiometricsAvailable = await auth.canCheckBiometrics();

Authenticate with only biometrics

final LocalAuthentication auth = LocalAuthentication();

authenticated = await auth.authenticateWithBiometrics(
    localizedReason: 'Biometrics only',
    useErrorDialogs: true,
    stickyAuth: true);

local_auth_device_credentials's People

Contributors

kennethj avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.