0.0.3 • Published 1 year ago

qrauth v0.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

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.

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago