Face Session Flow

Note: This feature requires an additional permission and must be explicitly requested

Face Session can be performed to validate a user using facial recognition based on an existing id photo. In order to use this feature you have to upload the id photo through our "Face Session API". The API returns a temporary session id that is required to initialize the face session process. See the diagram sample below:

Face session interface definition:

try {
  const result = uqudoSdk.faceSession({
     	sessionId: string;
     	returnDataForIncompleteSession?: boolean;
     	maxAttempts?: number;
     	minimumMatchLevel?: number;
    	onSuccess?: (result) => {
	  // Result returned after a successful face session
	  console.log(result)
	};
	onError?: (error) => {
	  // Error returned from the face session process failure 
	  console.log(error)
	};
    	onFinally?: () => void;
     	assets?: IAssetsArg;
     	texts?: ITextsArg;
  });
} catch (error) {
}

Below the configuration options for face session:

AttributeDescriptionRequired

sessionId

Session id returned by the face session API

true

returnDataForIncompleteSession

When enabled, if the user or the SDK drops the session before completion and there was at least one failed facial recognition attempt, the SDK will return the partial data together with the OperationError object in the data attribute, that will contain the same JWS string that is returned in a successful scenario

No. Default false

maxAttempts

Set the max failed facial recognition attempts before dropping the session. Note: only values between 1 and 3 are taken into consideration.

No. Default to 3

minimumMatchLevel

Defines the minimum match level that the facial recognition has to meet.

No. Default to 3

onSuccess

Callback function called after the process is done successfully. The result is a string, see "SDK result (Face Object)" for details

false

onError

Callback function called when the process returns an error. See Operation Error

false

onFinally

Callback function called after the process is done, successfully or unsuccessfully.

false

assets

List of assets

texts

List of texts

Last updated