title: How does fingerprint authentication work with iOS/Android with api endpoint in Cordova?
body: <p>I have a Cordova React project where I had to implement the login through fingerprint and facial recognition. I am using <a href="https://www.npmjs.com/package/cordova-plugin-fingerprint-aio" rel="nofollow noreferrer">https://www.npmjs.com/package/cordova-plugin-fingerprint-aio</a> for this purpose.</p>
  <p>The requirement is that users can log in to the system with fingerprint or facial recognition. For this user have to enable fingerprint or facial recognition the dashboard and this detail will go to the endpoint where it will go to the server. and next time user just taps and it will get its details from the server and so he can log in to the system.</p>
  <pre><code>      let options = 
      {
        description: 'Authenticate',
        clientId:'fingerprint-demo',
        clientSecret:'password',
        disableBackup: false,
        confirmationRequired: true,
        cancelButtonTitle:&quot;Use Backup&quot;
      }
    
      const location = useLocation();
  
    useEffect(() =&gt; {
      console.log(window);
      window.Fingerprint.isAvailable((result) =&gt; {
        console.log('FingerPrint available', result);
  
        window.Fingerprint.show(options,
  
          (param) =&gt; {
  
            console.log(&quot;Authentication successful&quot;, param);
          },
  
          (error) =&gt; {
            console.log('Authentication failed', error)
          }
  
        )
  
      },
      (error) =&gt; {
        console.log('Error occurred', error);
      }, 
      {
        allowBackup: false
      })
  
  
    }, [location]);
  </code></pre>
  <p>Confusions:</p>
  <ol>
  <li>What is clientId and how it will be generated?</li>
  <li>What unique detail can we sent to the server so he can authenticate because I'm not getting any?</li>
  </ol>
  <p>Problems</p>
  <ol>
  <li>First of all most of the time when I scan directly using thumb (currently only checked in android) it gives <strong>BIOMETRIC_AUTHENTICATION_FAILED = -102;</strong> but when I clicked back up and through there I scan or gives passcode it works and gives <strong>biometric_success</strong></li>
  </ol>
  <p>Can anyone help me in summarizing the whole problem that how this can be achieved and all steps?
  Thanks in advance.</p>
  <p>My Current platform versions
  Android: 9.0
  Ios: 5.1.1</p>