PingOne

Preparing the signals-sdk to generate a browser fingerprint

If you’re using the PingFederate Authentication API for the Remember Me experience, set up the signals-sdk-<version>.js file for use with either the pingone-mfa-remember-me-spinner.html file (included with PingOne MFA Integration Kit 3.2 and later) or a custom .html file.

Making these preparations enables the .js and .html files to generate a new browser fingerprint for remembered device verification or creation every time the PingFederate authentication API enters the EVALUATE_REMEMBER_ME_DEVICE or MANAGE_REMEMBER_ME_DEVICE state.

Preparing the signals-sdk for use with the included pingone-mfa-remember-me-spinner.html file

Out of the box, the signals-sdk-<version>.js file (included with PingOne MFA Integration Kit 3.2 and later) handles the following tasks:

  • Opening the included pingone-mfa-remember-me-spinner.html file (or the .html file you created) in the browser you want to create a fingerprint for.

  • Generating the payload and pasting it as the browserFingerprint value for the submitDeviceInformation action in the PingFederate Authentication API.

Steps

  1. Move the signals-sdk-<version>.js file from the scripts directory to the deploy directory.

Result

The signals-sdk-<version>.js file is ready to automate browser fingerprint generation.

Preparing the signals-sdk for use with a custom .html file

Complete first-time setup of the signals-sdk-<version>.js file and embed it into your custom .html file.

Using the pingone-mfa-remember-me-spinner.html file as a reference, you’ll import the script, then create functions to initialize the SDK and collect the browser fingerprint data.

Steps

  1. Move the signals-sdk-<version>.js file from the scripts directory to the deploy directory.

  2. Import the required script by including the following code segment in your custom .html file.

    Update the path to match the version of the PingOne signals-sdk you’re using. You must use version 5.6.3 or later.

    <script
            src="https://apps.pingone.com/signals/web-sdk/5.6.3/signals-sdk.js"
            defer>
    </script>
  3. Initialize the SDK by adding a listener for the PingOneSignalsReadyEvent event:

    function onPingOneSignalsReady(callback) {
        if (window['_pingOneSignalsReady']) {
            callback();
        } else {
            document.addEventListener('PingOneSignalsReadyEvent', callback);
        }
    }
    1. Then add the following function:

      To use the remembered device mechanism, the Signals SDK must have the universalDeviceIdentification option enabled. If the option isn’t enabled, you’ll get an error regarding the SDK payload when you try to create the remembered device.

      onPingOneSignalsReady(function () {
          _pingOneSignals.init({
              universalDeviceIdentification: true,
          }).then(function () {
              console.log("PingOne Signals initialized successfully");
          }).catch(function (e) {
              console.error("SDK Init failed", e);
          });
      });
  4. Get the data for device assessment or creation by adding a call to the SDK’s getData method.

    For example:

    _pingOneSignals.getData()
    .then(function (result) {
    console.log("get data completed: " + result)
    }).catch(function (e) {
    console.error('getData Error!', e);
    });
  5. Using the pingone-mfa-remember-me-spinner.html file as a reference, you must also ensure that the .html file renders every time the PingFederate authentication API enters the EVALUATE_REMEMBER_ME_DEVICE or MANAGE_REMEMBER_ME_DEVICE state, and pass the payload as the browserFingerprint value for the submitDeviceInformation action.

Result

The signals-sdk-<version>.js file is ready to automate browser fingerprint generation.