Comment on page
Account Recovery Flow
Add the following code at the start-up of your application to initialise the SDK:
import 'package:uqudosdk_flutter/UqudoIdPlugin.dart';
import 'package:uqudosdk_flutter/uqudosdk_flutter.dart;
...
UqudoIdPlugin.init();
...
AccountRecoveryBuilder,
UqudoIdSDK
} from 'uqudosdk-react-native';
...
//On App startup
constructor(){
super()
new UqudoIdSDK().init();
}
...
Use the below method for setting the locale of the application:
...
UqudoIdPlugin.setLocale(<your locale eg. en, ar etc.>);
...
Below you can find an example on how to initiate the account recovery process:
import 'package:uqudosdk_flutter/UqudoIdPlugin.dart';
import 'package:uqudosdk_flutter/uqudosdk_flutter.dart';
...
String result;
var token = "<please put your token here>";
try {
var accountRecoveryConfiguration = new AccountRecoveryConfigurationBuilder()
.setToken(token)
.setEnrollmentIdentifier("<your enrollment identifier>")
.setAppearanceMode(AppearanceMode.SYSTEM)
.build();
result = await UqudoIdPlugin.recover(accountRecoveryConfiguration);
} catch (error) {
}
In order to evaluate all the possible options please refer to section Account Recovery Flow. The JS interface is the porting of the JAVA one. In addition, you can check UqudoIdPlugin.dart inside the plugin folder or directly from your IDE.
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:
Property | Type | Optional | Default | Description |
---|---|---|---|---|
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 modified 6mo ago