Initialize
You can pass in different handler functions like the onLoad, onStart, onRestart, onPassStep, onComplete or onError method to handle different events of the verification flow to the init function.
| Argument | Description |
|---|---|
| Method that is being called once a verification flow is loaded. You can use this to show your own loader and then show div allpass. |
| Method that is being called once a user starts the verification flow.
|
| Method that is being called once a user starts the verification flow, but the verification is not completed
|
| Method that is being called once a user pass any step of the verification flow.
|
| Method that is being called once the verification is completed.
|
|
|
Allpass.init({
onLoad: () => {},
onRestart: ({appKey, transactionId, externalUserId}) => {},
onStart: ({appKey, transactionId, externalUserId}) => {},
onPassStep: ({appKey, transactionId, stepType, externalUserId}) => {},
onComplete: ({appKey, transactionId, externalUserId}) => {},
onError: ({appKey, transactionId, error, stepType, externalUserId}) => {},
});
If user doesn't finish verification process and current session is still active - we can automatically start this verification. In order to make it you should call restart after init method.
Allpass.restart();
Also it could be chaining with an init method:
Allpass.ai
.init({onComplete: ({appKey, transactionId, externalUserId, flowId, mode}) => {}})
.start(accessToken);