Displaying Keyfax Self-Service
Our recommendations for displaying Keyfax Self-Service.
Last updated
Was this helpful?
Our recommendations for displaying Keyfax Self-Service.
Last updated
Was this helpful?
This article relates to Keyfax Self-Service integrations where you may wish to display Keyfax Self-Service from within your existing tenant portal.
Unlike Keyfax Staff where advisor access can be closely controlled, tenants can access Keyfax Self-Service on a wide variety of browsers and devices and as such Omfax Systems would encourage integrators to keep any Keyfax Self-Service integration as simple as possible to support the broadest range of browsers and devices.
When integrating Keyfax Self-Service into your tenant portal we would generally suggest using a pop-up window to display Keyfax or simply opening Keyfax within the same browser tab or a new browser tab. We would generally advise avoiding an iframe to display Keyfax as iframes have various usability issues and security restrictions.
Browsers are increasingly blocking 3rd party cookies. Features such as Intelligent Tracking Protection (ITP) within WebKit & Privacy Sandbox within Chromium block all 3rd party cookies (cookies on requests to domains that are not the same as the domain showing within the browsers address bar). In many cases 3rd party cookies are blocked by default regardless of the samesite
and or secure
cookie attributes which can have unexpected side effects within Keyfax.
Apple has forced browser vendors on iOS / macOS to adopt ITP and as part of this 3rd party cookies must be disabled by default by browsers on iOS/macOS. Chrome will be deprecating support for all 3rd party cookies at the end of 2023 with a feature called .
As browsers are blocking 3rd party cookies more and more to help future proof host integrations Omfax Systems would not recommend displaying Keyfax within a 3rd party / cross-domain iframe and instead if Keyfax and your host application need to be installed on different domains would recommend displaying Keyfax as a 1st party web site either by displaying Keyfax within a browser pop-up window or a full browser tab. Displaying Keyfax within a pop-up window allows the browser to display the browser address bar at the top of the pop-up window to the user and so the browser treats pop-up windows as 1st party web sites.
For the best user experience and most reliable, future proof Keyfax integration Omfax Systems would generally suggest displaying Keyfax as a 1st party web site. Omfax Systems can visually customise the look and feel of your Keyfax installation to perfectly match your existing tenant portal or branding to provide a more seamless, consistent experience to your end-users.
Displaying Keyfax within a pop-up window will ensure Keyfax is presented as a 1st party web site however pop-up windows do come with their own drawbacks. For example it's possible the pop-up window could be blocked by a users pop-up blocker and / or the user may need to perform additional steps to allow the pop-up window.
For the best possible end-user experience Omfax Systems would generally suggest simply displaying Keyfax within the same browser tab or within a new browser tab and having Keyfax return to your tenant portal after Keyfax completes.
Our KeyNamics for Power Pages Portals integration already displays Keyfax within a pop-up window as shown here...
The full JavaScript code used for this example can be found here...
The full CSS code used for this example can be found here...
In the below examples we'll share some basic code and considerations to help you achieve a similar behavior with your Keyfax integration. Please remember however that the code presented below is the minimal to help you get started and we would encourage you to review the full JavaScript & CSS linked above for a more complete working example.
Once Keyfax has returned a launch URL (after you call the start-up web service) you would typically take this launch URL and display this within a browser pop-up window. To help we've provided the following createPopUp()
method below...
You would call the createPopUp()
method like so...
To detect if users close the Keyfax pop-up window additional client-side JavaScript code would be necessary. In the above example we use a setInterval
JavaScript timer to continually check the pop-up window status and if the code detects the window has been closed the parent or opening page can be updated to inform the user.
To achieve this we'll add a new addPopUpCloseListener
method which will periodically check the newWindow
global variable as defined above. This new method can be seen below...
This listener should be added immediately after calling createPopUp
. For example...
To close the pop-up window once Keyfax has completed you would typically pass in a "ReturnURL" as part of the Keyfax start-up data to return the user back to a custom page once Keyfax completes. This custom page would contain client side code to either automatically close the pop-up window or allow the user to manually close the window.
For example to automatically close the pop-up window you would simply invoke window.close()
when the user lands back on the custom completed page. You could also optionally add a button to allow the user to close the window and simply add window.close()
into the buttons click handler.
You can also invoke client-side JavaScript code on the parent / opening page. For example if you had a global method on your parent page called handleKeyfaxCompleted
you could invoke this method from the custom completed page within the pop-up window like so window.opener.handleKeyfaxCompleted()
. The handleKeyfaxCompleted()
method on your parent page could be responsible for updating DOM elements on your parent / opening page to thank the user for the submission or perform additional logic.
Whilst not functionally required you'll notice in the above KeyNamics for Power App Portals example the background becomes blurred when you open the Keyfax pop-up window. This is achieved by adding a semi-transparent overlay and applying a blur effect to parent pages CSS whenever the Keyfax pop-up window is active. Whilst beyond the scope of this guide if you wanted to achieve a similar effect we would encourage you to review the showPopUpOverlay()
and hidePopUpOverlay()
methods within the full JavaScript linked above. The full CSS used is also linked above.
For example on a mobile device you would typically not have enough screen space to display a pop-up window.
Mobile browsers are aware of this and all mobile browsers we've tested seem to treat the call to window.open()
similar to a regular anchor tag with a target="_blank"
attribute, You'll notice on a mobile device or tablet that a pop-up window won't display and instead the browser will simply spawn a new tab. The mobile browser is aware this tab was opened in the context of a pop-up window and allows calls to window.close()
to automatically close the tab if desired.