How can I customize the LoginRadius IDX page?

96 Views Asked by At

I want to customize the loading flow for my users in case:

If the user is logged in, then it still shows the login page (with username, password, and buttons) for a few seconds, then goes to the return URL (with no user interaction). Still, it's very odd that the login page shows and seems like they should have to do something. Is there a way to tell if a user is logged in to LoginRadius without showing the login page?

1

There are 1 best solutions below

1
Abhimanyu Rathore On BEST ANSWER

IDX page is fully customizable with Developer and Developer Premium Plan

If you want to change the default behavior of Auth Page to achieve you mentioned flow, please follow these steps:

  • ​Navigate to Advanced Editor as mention in the Advance Editor Document.

  • Navigate to Before Script under Authentication Pages.

  • Find the hook endprocess where it is registered.

    The code will look like this:

    LRObject.$hooks.register(""endProcess"", function () {
      if (document.getElementById(""interfacecontainerdiv"").firstChild) {
        $(""#social-block-label"").show();  
      }  visibleLoadingSpinner(false);
    });
    Replace this code with the below code:
    LRObject.$hooks.register(""endProcess"", function(action) {
        if (document.getElementById(""interfacecontainerdiv"").firstChild) {
          $(""#social-block-label"").show();  
        }    
        if (action !== ""registration"" && action !== ""login"" && action !== ""setToken"" && action !== ""socialLogin"" && !LRObject.setHostedToken) {
          visibleLoadingSpinner(false);  
        }  
    });