open-index/open-npm huggingface dataset:
npm package: @nu-id/qr-auth
Description: The NU.id QR Auth is a Node.js React component library that enables seamless login using NU.id via a QR code. With this library, users can log in to services securely without the need to type in their credentials.
Author: Robin Syihab
Latest version: 0.0.8

## NU.ID QR Auth React Component

The NU.id QR Auth is a Node.js React component library that enables seamless login using NU.id via a QR code. With this library, users can log in to services securely without the need to type in their credentials. 

To use the library, you need to install it first. You can do that by running the following command in your terminal:

```npm install @nu-id/qr-auth```

Once installed, you can import it into your React project and use it to integrate Nu.id authentication into your app. 

Here's an example of how you can use the library:

```
import React from 'react';
import { NuIDQRAuth } from '@nu-id/qr-auth';

const Login = () => {
  const onSuccess = (credentials) => {
    // handle successful login
  };

  const onFailure = (error) => {
    // handle failed login
  };

  return (
    <NuIDQRAuth
      clientId="<your_nu.id_client_id>"
      onSuccess={onSuccess}
      onFailure={onFailure}
    />
  );
};

export default Login;
```

Make sure to replace `<your_nu.id_client_id>` with your actual Nu.id client ID.