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.htmlfile (or the.htmlfile you created) in the browser you want to create a fingerprint for. -
Generating the payload and pasting it as the browserFingerprint value for the
submitDeviceInformationaction in the PingFederate Authentication API.
Steps
-
Move the
signals-sdk-<version>.jsfile from thescriptsdirectory to thedeploydirectory.
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
-
Move the
signals-sdk-<version>.jsfile from thescriptsdirectory to thedeploydirectory. -
Import the required script by including the following code segment in your custom
.htmlfile.Update the path to match the version of the PingOne
signals-sdkyou’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> -
Initialize the SDK by adding a listener for the
PingOneSignalsReadyEventevent:function onPingOneSignalsReady(callback) { if (window['_pingOneSignalsReady']) { callback(); } else { document.addEventListener('PingOneSignalsReadyEvent', callback); } }-
Then add the following function:
To use the remembered device mechanism, the Signals SDK must have the
universalDeviceIdentificationoption 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); }); });
-
-
Get the data for device assessment or creation by adding a call to the SDK’s
getDatamethod.For example:
_pingOneSignals.getData() .then(function (result) { console.log("get data completed: " + result) }).catch(function (e) { console.error('getData Error!', e); }); -
Using the
pingone-mfa-remember-me-spinner.htmlfile as a reference, you must also ensure that the.htmlfile renders every time the PingFederate authentication API enters theEVALUATE_REMEMBER_ME_DEVICEorMANAGE_REMEMBER_ME_DEVICEstate, and pass the payload as the browserFingerprint value for thesubmitDeviceInformationaction.