# Use cases

This section describes the integrating use cases for VerifEye's Redirect.

# Use cases Verification setup

All the below examples use the following setup:

  • Liveness Verifier in Verification mode
  • Age Verifier in Threshold Verification mode (Above 18)
  • Face Recognition Verifier in Calculation Only mode
  • Gender Verifier in Calculation Only mode
  • They use the same collection

# Use case: Full-page redirect

When to use

  • simplest integration; users leave your site temporarily and come back via redirect

How it works (conceptually)

  • you send the user to the VerifEye verification URL
  • the user completes the verification
  • VerifEye redirects the browser to your result URL with the outcome in the query string parameters

Recommended

  • validate reSignature server-side to avoid result tampering

For more information about the signature, check out the Security page
../security/

Example

In this example we use the EU service.

https://example.com/?reVerificationSessionId=7a429371-f918-4900-bf1b-14a76e551042&reFaceId=99a9e4e3ac75406ebd638f95bc4f0b30&reVerificationResult=passed&reLivenessResult=passed&reFaceRecognitionResult=passed&reAgeVerificationResult=passed&reAge=31&reGenderVerificationResult=passed&reGender=male&reSignature=70ac1eb0762395c831a09f53f854ca7e9745bf5755b83ed8137ed21dec9c7307           

Click here to try out
https://verifeye-service-eu.realeyes.ai/verification/e4fc930b-d780-47e3-ae4c-0d5d2f22e54e

# Use case: Embedded iFrame

When to use

  • you want the verification flow embedded in your page without full navigation

How it works (conceptually)

  • you embed the hosted verification URL in an iFrame
  • after completion, VerifEye navigates to a result page that posts a message to the parent window containing:
    • redirectedTo: the final result URL

Recommended

  • validate event.origin on the host page
  • validate reSignature on your backend if you need tamper detection

For more information about origin check and the signature, check out the Security page
../security/

Example

https://verifeye-docs.realeyes.ai/iframe_popup_result_example.html?reVerificationSessionId=d7c09541-03c1-403e-9b3c-146468657f27&reFaceId=99a9e4e3ac75406ebd638f95bc4f0b30&reVerificationResult=passed&reLivenessResult=passed&reFaceRecognitionResult=passed&reAgeVerificationResult=passed&reAge=31&reGenderVerificationResult=passed&reGender=male&reSignature=462cfda7b1999f243867d5a2ab1725624ca7d85d807b7e8d3cb1f285648c0810

Click here to try out
../../static/iframe_example.html

The following file is a minimum example for how to use VerifEye iFrame integration

iframe_example.html
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>VerifEye - iFrame Example</title>
    <style>
        .re-verify-button {
            background-color: rgb(39, 234, 191);
            color: rgb(39, 50, 53);
            padding: 10px 20px;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            font-size: 12.6px;
            font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
            box-shadow: rgba(0, 0, 0, 0.25) 0px 2.8093px 14.0465px;
            font-weight: 550;
            border-bottom-style: solid;
            border-bottom-width: 1px;
            border-bottom-color: rgb(39, 234, 191);
        }

        .re-verify-button:hover {
            background-color: rgb(22, 160, 134);
            border-bottom-color: rgb(22, 160, 134);
            color: white;
        }

        .re-modal {
        position: fixed;
        inset: 0;
        width: 100vw;
        height: 100vh;
        z-index: 1000;
        background: rgba(0, 0, 0, 0);
        }

        .re-modal.hidden {
        visibility: hidden;
        pointer-events: none;
        opacity: 0;
        }

        .re-modal.visible {
        visibility: visible;
        pointer-events: auto;
        opacity: 1;
        }

        .re-modal iframe {
        width: 100%;
        height: 100%;
        border: none;
        }


    </style>
    <script>
    /*
        IMPORTANT: This sample demonstrates the simplest integration case, omitting production-grade checks,
        edge case handling, and other complexities.

        IMPORTANT: VerifEye allowed to be embedded in an iframe only on HTTPS sites.

        To integrate with VerifEye, only a few lines of JavaScript are needed.
        The Verification has already been set up as a precondition, to simplify this example.

        Flow Overview
        - Clicking the Verify button opens the iframe in a modal popup to perform the verification.
        - After the verification flow the result url is shown.

        Additional Steps for End-to-End User Identification (Customer system is necessary)
        - As a result, the sample demonstrates how to obtain the result url with the parameters.
        The integrator should parse the URL parameters and use them according to their needs.

        For a production-grade solution URL signing and final result signature validation is required. VerifEye is capable to allow only signed URL-s.
        In such case the customer system should sign the URL for the iFrame and use it.
        Additionally, to ensure that results are not manipulated customer system should validate the result signature and accept results only in case the signature is valid.
        */

        function closeIFrame() {
            document.getElementById('re-modal').className = 're-modal hidden';
            document.getElementById('re-iframe').src = '';
        }

        function openVerifyIFrame(isSimplified = false) {
            document.getElementById('re-verify').style.display = "none";
            document.getElementById("re-result").style.display = "none";
            var iframe = document.getElementById('re-iframe');

            //The pre-configured project URL. The service is regional. The region code 2-letter is at the end of the sub-domain
            //The last section in the URL path is the identifier for the Verification
            //IMPORTANT: Verify allowed to be embedded in an iframe only on HTTPS sites.

            iframe.src = 'https://verifeye-service-eu.realeyes.ai/verification/3bb1fb37-9d3a-423f-b5bc-1790a329f117';
            document.getElementById('re-modal').className = 're-modal visible';

            //This code sets up an event listener for messages sent to the current window from the embedded iframe, which uses postMessage.
            window.addEventListener('message', (event) => {
                //Note: checking the origin of the message is crucial in production-grade code to avoid security issues. This sample omits this check for simplicity.

                //The event object has a 'data' property, which contains, in our case, only a single field 'redirectedTo'
                //The 'redirectedTo' is populated with the URL after the redirect happened at the end of the verification inside the iFrame
                var urlString = event.data.redirectedTo;

                closeIFrame();

                document.getElementById("re-result").style.display = "block";
                document.getElementById("re-result-text").innerHTML = "The final redirect URL is: " + urlString;
            });
        }
    </script>
</head>
<body>
    <div id="re-verify" style="text-align:center">
        <button id="re-verify-button" onclick="openVerifyIFrame()" class="re-verify-button">
            Verify
        </button>
    </div>

    <div id="re-modal" class="re-modal hidden">
        <iframe id="re-iframe" src="" allow="camera 'self' https://verifeye-service-eu.realeyes.ai" frameborder="0"></iframe>
    </div>
    <div id="re-result" style="display: none; text-align: center">
        <span id="re-result-text" style="color: green"></span>
        <button onclick="openVerifyIFrame()" class="re-verify-button">
            Verify again
        </button>
    </div>
</body>
</html>

This file shows what is set for the Target URL. This is a technical file that is responsible to receive the result query string parameters and send back the whole URL to the hosted site via postMessage.

iframe_popup_result_example.html
<!DOCTYPE html>
<html>
<body>
    Result
    <script>
        const isInIframe = window.self !== window.top;
        const isPopup = !!window.opener;

        if (isInIframe)
            window.top.postMessage({ redirectedTo: window.location.href }, '*');
        if (isPopup)
            window.opener.postMessage({ redirectedTo: window.location.href }, '*');
    </script>
</body>
</html>

# Use case: Popup window

When to use

  • you want to keep the host page intact and run verification in a separate window

How it works (conceptually)

  • you open a popup to the hosted verification URL
  • after completion, the popup navigates to the result page and posts a message to window.opener with:
    • redirectedTo: the final result URL
  • and finally the popup window closes

Recommended

  • handle popup blockers and provide a fallback
  • validate event.origin on the host page
  • validate reSignature on your backend if you need tamper detection

For more information about origin check and the signature, check out the Security page
../security/

Example

https://verifeye-docs.realeyes.ai/iframe_popup_result_example.html?reVerificationSessionId=5048626a-8fb5-4116-bcdf-8754a85bba4a&reFaceId=99a9e4e3ac75406ebd638f95bc4f0b30&reVerificationResult=passed&reLivenessResult=passed&reFaceRecognitionResult=passed&reAgeVerificationResult=passed&reAge=31&reGenderVerificationResult=passed&reGender=male&reSignature=462cfda7b1999f243867d5a2ab1725624ca7d85d807b7e8d3cb1f285648c0810

Click here to try out
../../static/popup_example.html

The following file is a minimum example for how to use VerifEye Popup integration

popup_example.html
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>VerifEye - Popup Example</title>
    <style>
        .re-verify-button {
            background-color: rgb(39, 234, 191);
            color: rgb(39, 50, 53);
            padding: 10px 20px;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            font-size: 12.6px;
            font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
            box-shadow: rgba(0, 0, 0, 0.25) 0px 2.8093px 14.0465px;
            font-weight: 550;
            border-bottom-style: solid;
            border-bottom-width: 1px;
            border-bottom-color: rgb(39, 234, 191);
        }

        .re-verify-button:hover {
            background-color: rgb(22, 160, 134);
            border-bottom-color: rgb(22, 160, 134);
            color: white;
        }
    </style>
    <script>
    /*
        IMPORTANT: This sample demonstrates the simplest integration case, omitting production-grade checks,
        edge case handling, and other complexities.

        To integrate with VerifEye, only a few lines of JavaScript are needed.
        The Verification has already been set up as a precondition, to simplify this example.

        Flow Overview
        - Clicking the Verify button opens a popup to perform the verification.
        - After the verification flow the result url is shown.

        Additional Steps for End-to-End User Identification (Customer system is necessary)
        - As a result, the sample demonstrates how to obtain the result url with the parameters.
        The integrator should parse the URL parameters and use them according to their needs.

        For a production-grade solution URL signing and final result signature validation is required. VerifEye is capable to allow only signed URL-s.
        In such case the customer system should sign the URL for the popup and use it.
        Additionally, to ensure that results are not manipulated customer system should validate the result signature and accept results only in case the signature is valid.
        */

        function closeIFrame() {
            document.getElementById('re-modal').className = 're-modal hidden';
            document.getElementById('re-iframe').src = '';
        }

        function openVerifyPopup(isSimplified = false) {
            document.getElementById('re-verify').style.display = "none";
            document.getElementById("re-result").style.display = "none";
            var iframe = document.getElementById('re-iframe');

            //The pre-configured project URL. The service is regional. The region code 2-letter is at the end of the sub-domain
            //The last section in the URL path is the identifier for the Verification
            const verifyWindow = window.open("https://verifeye-service-eu.realeyes.ai/verification/3bb1fb37-9d3a-423f-b5bc-1790a329f117", "_blank");

            //This code sets up an event listener for messages sent to the current window from the popup, which uses postMessage.
            window.addEventListener('message', (event) => {
                //Note: checking the origin of the message is crucial in production-grade code to avoid security issues. This sample omits this check for simplicity.

                //The event object has a 'data' property, which contains, in our case, only a single field 'redirectedTo'
                //The 'redirectedTo' is populated with the URL after the redirect happened at the end of the verification inside the iFrame
                var urlString = event.data.redirectedTo;

                verifyWindow.close();

                document.getElementById("re-result").style.display = "block";
                document.getElementById("re-result-text").innerHTML = "The final redirect URL is: " + urlString;
            });
        }
    </script>
</head>
<body>
    <div id="re-verify" style="text-align:center">
        <button id="re-verify-button" onclick="openVerifyPopup()" class="re-verify-button">
            Verify
        </button>
    </div>

    <div id="re-result" style="display: none; text-align: center">
        <span id="re-result-text" style="color: green"></span>
        <button onclick="openVerifyPopup()" class="re-verify-button">
            Verify again
        </button>
    </div>
</body>
</html>

This file shows what is set for the Target URL. This is a technical file that is responsible to receive the result query string parameters and send back the whole URL to the hosted site via postMessage.

iframe_popup_result_example.html
<!DOCTYPE html>
<html>
<body>
    Result
    <script>
        const isInIframe = window.self !== window.top;
        const isPopup = !!window.opener;

        if (isInIframe)
            window.top.postMessage({ redirectedTo: window.location.href }, '*');
        if (isPopup)
            window.opener.postMessage({ redirectedTo: window.location.href }, '*');
    </script>
</body>
</html>

Last updated: 2026-02-03