Pass the login credentials as URL parameters
You can authenticate users automatically in your ClickHelp portal when they visit an URL from anywhere in your application or a website without using SSO or Login Tokens by passing the login and password as URL parameters.
Here is an example of such an URL: https://help.docs.com/login/?l=LOGIN&p=PASSWORD
This link will only fill out the corresponding fields, not log you in, so you might want to implement a small script that would simulate the login button click so that the user doesn’t have to click anything. Put it into the Branding Script:
|
function appendEventHandler(node, type, handler, disconnect) { function wrapHandler(event) { handler(event || window.event); } var wrapHandler = handler; if (typeof node.addEventListener == "function") { node.addEventListener(type, wrapHandler, false); if (disconnect) return function () { node.removeEventListener(type, wrapHandler, false); }; } else if (node.attachEvent) { node.attachEvent("on" + type, wrapHandler); if (disconnect) return function () { node.detachEvent("on" + type, wrapHandler); }; } }
function submitLoginForm() { document.querySelector(".Login_button").click(); }
appendEventHandler(window, "load", function(){ if (window.location.pathname.indexOf("/login/") == 0) { const urlParams = new URLSearchParams(window.location.search); if (urlParams.has("l") && urlParams.has("p")) { setTimeout(submitLoginForm, 100) } } }) |