1.2.5 • Published 3 years ago

rn-local-authentication v1.2.5

Weekly downloads
25
License
MIT
Repository
github
Last release
3 years ago

React Native Local Authentication

The library helps you to authenticate users biometrically natively on both iOS and Android devices. For iOS LocalAuthentication Framework is used, and for android: androidx.biometric:biometric framework (BiometricPrompt, BiometricManager)

Inspired by react-native-fingerprint-scanner and Android BiometricPrompt class that manages a system-provided biometric prompt.

Under construction

Platforms Supported

  • iOS
  • Android

Getting Started

Read Getting Started Guide. If any step seems unclear, please create a detailed issue.

TOC

Versioning

Breaking History:

  • 1.0.0 - first release

Usage

iOS example

Import LocalAuthentication from rn-local-authentication and use it like so:

import React from 'react';
import { View } from 'react-native';
import LocalAuthentication from 'rn-local-authentication';

// ...
class MyComponent extends React.Component {
  componentDidMount() {
    LocalAuthentication.authenticateAsync({
      reason: "Authorize please!"
    }).then(response => {
      if (response.success) {
        console.log('Authorized successfully!');
      } else {
        console.log(`Something went wrong. Error: ${response.error}`);
      }
    })
  }

  render() {
    return (<View />);
  }

  // ...
}

link to example launch

License

MIT

1.2.5

3 years ago

1.2.4

3 years ago

1.2.3

4 years ago

1.2.2

4 years ago

1.2.1

4 years ago

1.2.0

4 years ago

1.1.0

4 years ago

1.0.0

4 years ago

0.0.8

4 years ago

0.0.7

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago