Customer Website Login Iframe

General

While it's possible to use the API to build a more customized login experience, it is also possible to iframe a dedicated login page into your existing website. This can be done in the following way.

Build the iframe URL

The iframe URL will be something like this:

https://loanpro.simnang.com/client/public/iframe/customerLogin.html?domain=[Your Domain Identifier].loanpro.software&tenant=[Your Tenant ID]&logout=[URL Where User is Redirected Upon Logout]

  • Your Domain Identifier - This can be found by navigating to My Account > Company Profile > Company Contact Information. It is the value for the field labeled "Web Domain Name". 
  • Tenant ID - Is numeric and identifies your tenant. It can be viewed on the Companies page or found in most emails sent to you from LoanPro.
  • URL Where User is Redirected Upon Logout - This should be formatted as https://www.google.com.

If your domain identifier is mycompany, your tenant ID is 50000 and your logout URL is https://www.google.com, the URL will be https://loanpro.simnang.com/client/public/iframe/customerLogin.html?domain=mycompany.loanpro.software&tenant=50000&logout=https://www.google.com

The iframe will look like this:

<iframe src="https://loanpro.simnang.com/client/public/iframe/customerLogin.html?domain=mycompany.loanpro.software&tenant=50000&logout=https://www.google.com"></iframe>

Page HTML

In order to ensure the login will work for all browser, you will need to include some JavaScript on the same page as the iframe. The page will look like this:

<html>
<head>
<script type="text/javascript">
window.addEventListener("message", loginMessage, false);
function loginMessage(event)
{
if(event && event.data && event.data.redirectUrl)
{
window.location.href = event.data.redirectUrl;
}
};
</script>
</head>
<body>
<iframe src="https://loanpro.simnang.com/client/public/iframe/customerLogin.html?domain=mycompany.loanpro.software&tenant=50000&logout=https://www.google.com"
/>
</body>
</html>

Once this html has been added to your page, your customers will be able to login to the customer website from your website.


How did we do?


Powered by HelpDocs (opens in a new tab)