Skip to main content

Bio Login Module

The main purpose of Bio Login is to capture the user's facial data and upload it to the server for biometric authentication.
The result of the upload can be monitored. Unlike the other modules, whose upload callback only confirms that the document reached the server, the Bio Login callback reports whether the document was approved — its backend flow is synchronous, so the verdict comes back with the response instead of arriving later through the event listener.

Flow overviewFlowcharts of Bio Login with backend V1 and backend V2. Expand to view them, click a chart to enlarge.

Bio Login with backend V1

  • B1: configure (backend V1), set the event listener with AmaniEvent().setListener(...), start the session.
  • B2: capture with a selfie module.
  • B3: set the upload source to UploadSource.BIO_LOGIN.
  • B4: upload the selfie. If the upload fails, do not call upload() again: the data is cleared after it. Open the selfie again (a new fragment, or the old one with your own fragment handling, e.g. popBackStack), capture, then upload, up to your own max attempt. On V1 isSuccess is true when the status is OK or PENDING_REVIEW, and the verdict arrives in stepsResult / profileStatus after the upload.
  • B5: after the verdict has arrived, set the upload source back to UploadSource.KYC. Not inside the upload callback: the verdict is fetched after it and still reads the upload source.

Bio Login with backend V2

  • B1: configure (backend V2), set the event listener with AmaniEvent().setListener(...), start the session.
  • B2: capture with the BioLogin() module (manual, auto or pose estimation).
  • B3: BioLogin().upload(...): the callback carries the verdict; if it is not approved, capture again or fall back to another login method. If the answer is late or the callback is lost (e.g. the app was in the background), the same verdict also arrives in stepsResult / profileStatus.

Between v1 and v2, the main difference lies only in the backend implementation.
Both versions support capturing the selfie either automatically (when the user is in the correct position and lighting) or manually (by pressing a button).