Reverification
Reverification is only supported in the JS Plugin and
avant
theme currently.
The reverification job compares a new selfie to a source job's selfie, or a new ID to a source job's ID. This allows you to verify that the current user is the same person that was verified previously. To initiate a reverification job:
- Perform the initial verification job and capture the job id
- Submit a new job using the JS Plugin
- Set
type
toreverify
- Specify
match
to reverify against theid
orselfie
from the source job - Specify
jobId
from the source job in reverificationParameters - Set
theme
toavant
- Define
onReverify
to redirect to the next page once user is reverified
Reverification quick start code
<head>
<!-- utf-8 is required for JS Plugin default fonts -->
<meta charset="utf-8" />
<script src="https://static.vouched.id/widget/vouched-2.0.0.js"></script>
<script type='text/javascript'>
(function() {
var vouched = Vouched({
// specify reverification job
type: 'reverify',
reverificationParameters: {
// reference the source job by its id
jobId: 'gmYDEJWB2',
match: 'selfie'
},
// theme must be 'avant' for reverification
theme: {
name: 'avant',
},
appId: "<PUBLIC_KEY>",
// your webhook for POST verification processing
callbackURL: 'https://website.com/webhook',
// mobile handoff
crossDevice: true,
crossDeviceQRCode: true,
crossDeviceSMS: true,
onInit: ({token, job}) => {
console.log('initialization');
},
// called when the reverification is completed.
onReverify: (job) => {
// token used to query jobs
console.log("Reverification complete", { token: job.token });
// Redirect to the next page based on the job success
if( job.result.success){
window.location.replace("https://website.com/success/");
}else{
window.location.replace("https://website.com/failed/");
}
},
});
vouched.mount("#vouched-element");
})();
</script>
</head>
<body>
<div id='vouched-element' style="height: 100%"/>
</body>
Updated 4 months ago