npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-native-windows-hello

v1.1.0

Published

RNW library providing developer with all Windows Hello features

Downloads

46

Readme


Installation & Usage

To install this module cd to your project directory and enter the following command:

yarn add -D react-native-windows-hello

or

npm install react-native-windows-hello --save

After having it installed you can import all the Windows Hello features like so:

import { SignIn, verificationResult, availabilityStatus } from 'react-native-windows-hello';

The API contains two methods: requestConsentVerification and getDeviceStatus each returning a promise with result object containing both value and message with pre-defined text (in english) describing the returned result. So the example of usage would be:

SignIn.requestConsentVerification("This customized message will be displayed in biometric prompt")
  .then(result => {
    Alert.alert(
      `${result === verificationResult.Verified ? "SUCCESS" : "ERROR"}`,
      result.message
    );
  })
  .catch(error => {
    Alert.alert("ERROR:", `${error}`);
  });

Check out the example project for more examples.


API

The following library provides you with the native modules exposing the following methods:

| Method & Description | Arguments | Returns | | - | :-: |:-:| | SignIn.getDeviceStatus | | | | Gets the status of biometric device on a user's machine and returns a promise with the result.The returned promise is resolved with a status, and is rejected in case of any internal issues/errors. | - | PromisewithavailabilityStatus | | SignIn.requestConsentVerification | | | | Displays the biometric scan prompt as a popup and returns a promise after user's actions.The returned promise is resolved no matter if the verification was successful or not, and is rejected in case of any internal failure/error or when incorrect promptMessage has been passed as an argument.| promptMessage : StringAdditional text which will be placed in the login prompt popup. | PromisewithverificationResult |


Status result object

Each method returns one of the enumerated objects representing the result of called action (getDeviceStatus, requestConsentVerification). Each of these objects contain two properties:

  • value - contains numerical value matching the official values. This can be used by developers for internal implementation keeping the last result for simplicity.
  • message - official text (in english) saying exactly what the result is. This can be used to directly display the status without conversions.

There are two groups of result objects:

availabilityStatus

| Result | value | message | |-|-|-| | Available | 0 | "A biometric verifier device is available." | | DeviceNotPresent | 1 | "There is no biometric verifier device available." | | NotConfiguredForUser | 2 | "A biometric verifier device is not configured for this user." | | DisabledByPolicy | 3 | "Group policy has disabled the biometric verifier device." | | DeviceBusy | 4 | "The biometric verifier device is performing an operation and is unavailable." |

and

verificationResult

| Result | value | message | |-|-|-| | Verified | 0 | "User consent verified" | | DeviceNotPresent | 1 | "There is no biometric verifier device available." | | NotConfiguredForUser | 2 | "A biometric verifier device is not configured for this user." | | DisabledByPolicy | 3 | "Group policy has disabled the biometric verifier device." | | DeviceBusy | 4 | "The biometric verifier device is performing an operation and is unavailable." | | RetriesExhausted | 5 | "After 10 attempts, the original verification request and all subsequent attempts at the same verification were not verified." | | Canceled | 6 | "The verification operation was canceled." |


Contributing

If you would like to contribute to the react-native-windows-hello project, you are more than welcome! You can do this by:

  • Create an Issue and let the author handle it Each issue created in the Issues section gives a chance of improving the project and make it even more useful.
  • Create the Pull Request with the desired changes When creating the pull request please remember to describe changes you made and how to test them. A short demo of any kind is very appreciated.

Setting up the project

To start developing you need to fork this project, and clone your fork. After that you can:

  • yarn install
  • Implement changes (mostly in windows/ReactNativeWindowsHello/Source directory)
  • After implementation you can check the build by running: msbuild -p:Configuration=Debug -p:Platform=x64 .\windows\ReactNativeWindowsHello.sln Or launch the build through the Visual Studio.

Made with ❤️ at Callstack

react-native-windows-hello is an open source project and will always remain free to use. If you think it's cool, please star it 🌟. Callstack is a group of React and React Native geeks, contact us at [email protected] if you need any help with these or just want to say hi!

Like the project? ⚛️ Join the team who does amazing stuff for clients and drives React Native Open Source! 🔥