Security
This section describes the two security mechanisms most relevant to integrations:
- Incoming signed verification URL (request integrity)
- Outgoing signed result URL (result integrity)
These are independent features and can be enabled/used separately.
Incoming signed verification URL (request integrity)
This is the recommended setting for all projects. A verification configuration created in the Developer Console or through the Session API has ForceSignedInput enabled by default, and the console warns before you turn it off. Disabling it is only acceptable for local testing.
Some projects may require that the initial verification URL (the one your application sends the user to) is signed.
Purpose:
- prevent unauthorized tampering with query parameters before the verification starts
- ensure the verification session is initiated with an authentic, unmodified set of inputs
Integration guidance:
- sign with any of your account's API keys: the session keeps that key, signs its result with it and sends it in the webhook's
X-API-Keyheader - treat every API key as a secret; after a key leaks, rotate every key of the account, not only the leaked one
- sign URLs on a trusted system (typically your backend)
- do not generate signatures in browser JavaScript
If your project requires signed input and the signature is missing/invalid, the verification will be rejected.
A configuration that does not force signed input still accepts a signed URL: a valid signature starts the session with the key that signed it, and a URL without a valid signature starts it with your primary API key.
Best practice: short-lived, single-use links
For maximum security we recommend issuing a fresh signed URL for every session, with both an expiration (reExpiration) and a one-time-use nonce (reNonce). The signature creation endpoint applies safe defaults out of the box:
- Expiration is enabled by default (1 day lifetime). Calling the create-signature endpoint with no
SecuritySettingsproduces a URL that expires in 24 hours. ExpirationEnabledaddsreExpirationto the URL. The link is rejected with410 Goneafter the timestamp passes. The lifetime is controlled byExpirationInSeconds— default86400(1 day), maximum604800(7 days).EnableNonceaddsreNonceto the URL (opt-in). The first successful session consumes the nonce; subsequent attempts to open the same URL are rejected with410 Gone.
If your integration genuinely needs a reusable link (for example a verification URL embedded in an email that the user opens days later), send { "expirationEnabled": false } and omit the nonce.
Nonce requires expiration
When EnableNonce is true, expiration must remain enabled (which is the default). Sending { "enableNonce": true, "expirationEnabled": false } is rejected with 400 Bad Request.
When the URL is opened, the service validates in this order: signature, expiration, nonce. The nonce is only consumed if the signature is valid and the link has not expired, so a forged or stale URL never burns a legitimate nonce.
The same checks are also exposed by the POST /v1/signature/validate endpoint (read-only), so your backend can detect an expired or already-used link before redirecting the user. Validating via this endpoint does not consume the nonce.
Outgoing signature on the result URL (result integrity)
The result redirect includes reSignature, which can be used for tamper detection.
- Signature validation is optional.
- If you need higher assurance, validate
reSignatureon your backend before trusting any other parameters.
Operational recommendations:
- consider all query parameters untrusted until signature verification passes
- validate with the key the session was started with: the key that signed the verification URL or created the session, or your primary API key for a session started without one
- validate on your backend (or another trusted environment)
- if verification fails, do not trust or persist the reported outcome
Origin validation (for iFrame / Popup window)
In the iFrame and Popup use cases, the verification ends on the page your verification redirects to: the Target URL in the use cases, set as PassedUrl and FailedUrl or per session as rePassedUrl and reFailedUrl. That page posts a message with redirectedTo to the parent window or the opener, so the message comes from the origin of the URL it was loaded from. Host that page on your own origin.
The samples' Target URL, for example, is on https://verifeye-docs.realeyes.ai, and VerifEye's verification_result.html, the page the widget uses, posts from https://verifeye-service-{region}.realeyes.ai. Both post with "*" so that they work on any host page: do not use either as the Target URL of a production iFrame or Popup integration, and when you copy the sample to your own origin, replace "*" with your host page's origin.
Recommendations:
- on the page you redirect to, post the message to
window.parentorwindow.openerwith your host page's origin as the target origin, never"*" - on the host page, compare
event.originfor exact equality with the origins of the URLs you configured, and ignore every message from any other origin - also check that
event.sourceis your iFrame'scontentWindowor the popup window you opened - before you navigate to
event.data.redirectedToor link to it, parse it withnew URL()and check its origin and path - treat
event.data.redirectedToas untrusted input: send it to your backend, and trust none of its values until your backend has validatedreSignature - when you show the URL or a value from it on your page, set it with
textContent, neverinnerHTML
Last updated: 2026-11-11