Skip to main content

Recovery

Create Recovery Code

Client requirements


trustfactorClient.generateRecoveryCode() { result, correlationId in
switch result {
case .success(let recoveryCode):
// save the recovery code safely

case .failure(let error):
// handle errors
}
}

Listing profiles from a Recovery Code


trustfactorClient.getProfilesForRecoveryCode(code: <string>) { result, correlationId in
switch result {
case .success(let profiles):
// handle profiles list

case .failure(let error):
// handle errors
}
}

Restore profiles from a Recovery Code

Client requirements


trustfactorClient.restoreProfilesForRecoveryCode(code: <string>) { result, correlationId in
switch result {
case .success(let restorationResult):
// handle result

case .failure(let error):
// handle errors
}
}