Hide "Login with Windows Credentials" on the Login Page for Non-Windows Devices
  • 19 Jan 2023
  • 1 Minute to read
  • Dark
    Light

Hide "Login with Windows Credentials" on the Login Page for Non-Windows Devices

  • Dark
    Light

Article summary

Hide the "Login with Windows Credentials" Button

RapidIdentity supports Kerberos Authentication for users with domain joined Windows devices that enables them to login to RapidIdentity by simply clicking the Login with Windows Credentials button on the Login Page.
image.png

The button appears on the login page as soon as Kerberos Authentication is enabled in RapidIdentity.

Enabling Kerberos Authentication

Tenant Administrators can enable Kerberos Authentication in RapidIdentity by going to Configuration > Policies > Authentication and selecting Kerberos from the left navigation menu.

To use Kerberos Authentication, Tenant Administrators simply add the Kerberos Authentication Method to an Authentication Policy in the same configuration area.

When enabled, the button appears for all users regardless of their device. Tenant Administrators can hide the button from users with non-Windows devices such as iPads or Chromebooks by following these instructions:

  1. Navigate to Configuration > Security > Identity Providers.
  2. Select Web Template from the left navigation menu.
  3. Check the Enable Custom HTML (Advanced) checkbox.
  4. Copy & Paste the following code into the Custom HTML input area:
<script language="JavaScript">
  	function waitForElm(selector) {
		return new Promise(resolve => {
        	if (document.querySelector(selector)) {
            	return resolve(document.querySelector(selector));
          	}

			const observer = new MutationObserver(mutations => {
            	if (document.querySelector(selector)) {
                	resolve(document.querySelector(selector));
                  	observer.disconnect();
              	}
          	});

          	observer.observe(document.body, {
            	childList: true,
              	subtree: true
          	});
      	});
	}
	function tailorKerberos() {
		if (navigator.appVersion.indexOf("Win")==-1) {
        	console.log("OSName is not Windows, hiding button");
        	waitForElm('#authn-kerberos-wrapper')
        		.then((elm) => {
          			elm.style.display = 'none';
        		});
      	} 
	};
	document.addEventListener('DOMContentLoaded',tailorKerberos());
</script>
  1. Click the Save button on the bottom Action Menu and then click the Trigger Web Reload button to update the Login Page.
Note

This update will apply to all users as soon as the Trigger Web Reload is complete.

Customers are advised to test immediately after applying this change to ensure that Windows device users see the Login with Windows Credentials button while users on non-Windows devices do not.

To revert this change, simply un-check the Enable Customer HTML (Advanced) check box on the IdP Web Template then click the Save button followed by the Trigger Web Reload button to update the Login Page.

custom_html.png


Was this article helpful?


ESC

Eddy AI, facilitating knowledge discovery through conversational intelligence