The Antifraud module compares the current session against prior sessions and known identities to detect signs of fraud. Its screen is designed to execute in the background; it only appears briefly while the check completes.
For an overview of this module and how it works, see Antifraud Check.
How you use this module depends on your integration pattern. When the app defines the steps in code, you add the module to an IncdOnboardingFlowConfiguration as shown below; when the flow is defined in Dashboard, you reference it by ID and let the back end drive the steps. See Integration Approaches.
Availability: All variants.
Add Antifraud
Add the module with addAntifraud(). Add Antifraud as the last module in your flow. The one exception is when you also use the Custom Watchlist module. In that case, call addAntifraud() first, then addCustomWatchlist().
flowConfig.addAntifraud()
Configuration Options
Antifraud has no configurable settings.
Result
func onAntifraudCompleted(_ result: AntifraudResult)
AntifraudResult fields:
response: AntifraudResponse?: The outcome of the antifraud check, including its result status and which check produced it;nilwhen no response was obtained. SeeAntifraudResponsebelow.error: IncdError?: The error that occurred while checking for fraud, if any; otherwise,nil.
AntifraudResponse fields:
result: AntifraudStatus: The outcome of the antifraud check:FAILED,PASSED,NOT_EXECUTED, orUNKNOWN.stepName: AntifraudStepName?: The antifraud check that produced this result:FuzzyFieldAntifraudExecutor,IdFaceAntifraudExecutor,SelfieFaceAntifraudExecutor, orUNKNOWN.
Headless
IncdOnboardingManager.shared.antifraudCheck { result in /* AntifraudResult? */ }