Face Session Flow

Add the following code at the start-up of your application to initialise the SDK:

import { 
  FaceSessionBuilder, 
  UqudoIdSDK
} from 'uqudosdk-react-native';

...
//On App startup
constructor(){
    super()
    new UqudoIdSDK().init();
  }
...

Use the below method for setting the locale of the application:

...
new UqudoIdSDK().setLocale(<your locale eg. en, ar etc.>);
...

Below you can find an example on how to initiate the face session process:

var token = "<please put your token here>";
try {
   var faceSessionConfiguration = new FaceSessionBuilder()
	.setToken(token)
	.setSessionId("<your session id>")
      .setAppearanceMode(AppearanceMode.SYSTEM)
	.build();
   const sdk = new UqudoIdSDK();
   const result = await sdk.faceSession(faceSessionConfiguration);
   console.log(result);
} catch (error) {
}

In order to evaluate all the possible options please refer to section Face Session Flow. The JS interface is the porting of the Kotlin implementation. You can find the JS implementation in uqudoBuilder/uqudo.js under the uqudoid module path.

If successful, the response is a JSON Web Signature (JWS). Please refer to section "SDK result" for further details.

In case of a failure, the callback returns the following object:

PropertyTypeOptionalDefaultDescription

code

String

No

None

message

String

Yes

null

Description of the error if any

task

String

Yes

FACE

The value will be always FACE as the only step involved in account recovery is facial recognition

Last updated