Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
router.get('/dynamic-share', (req, res) => {
const locationExtension = new Yoti.LocationConstraintExtensionBuilder()
.withLatitude(51.5074)
.withLongitude(-0.1278)
.withRadius(6000)
.build();
const sourceConstraint = new Yoti.SourceConstraintBuilder()
.withPassport()
.withSoftPreference(false)
.build();
const constraints = new Yoti.ConstraintsBuilder()
.withSourceConstraint(sourceConstraint)
.build();
const givenNamesWantedAttribute = new Yoti.WantedAttributeBuilder()
.withName('given_names')
.withConstraints(constraints)
.withAcceptSelfAsserted()
.build();
const emailAddressWantedAttribute = new Yoti.WantedAttributeBuilder()
.withName('email_address')