• Resolved Debobrata

    (@debobrata)


    Hi,

    I have installed the plugin and integrated janrain sign-in widget (using triggerFlow). It works on http but doesn’t login/registers a user if it’s a https page. What could be a possible solution for this issue?

    Thanks in advance!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi, deb! triggerFlow is used for creating your own sign-in widget in Pro and Enterprise level implementations, whereas the WordPress plugin itself uses the standard widget. So, this is an interesting situation.

    Are you using Firefox, and is it possible your login page contains both http and https elements in it? Our widget automatically switches to all https elements if it recognizes it’s loaded onto a page using https, but Firefox tends to not let many scripts run if there’s mixed http/https content on a page. Also, could you post a link so I can take a look to verify that’s the case?

    Thread Starter Debobrata

    (@debobrata)

    Hey Juan,

    Thanks for getting back to me. We have solved the issue already. However, I got a script from janrain support, so if anyone is having problem with secured http, then the script below might help them to fix that.

    <script type="text/javascript">
    (function() {
    if (typeof window.janrain !== 'object') window.janrain = {};
    if (typeof window.janrain.settings !== 'object') window.janrain.settings = {};
    
    janrain.settings.tokenUrl = '__REPLACE_WITH_YOUR_TOKEN_URL__';
    
    function isReady() { janrain.ready = true; };
    if (document.addEventListener) {
      document.addEventListener("DOMContentLoaded", isReady, false);
    } else {
      window.attachEvent('onload', isReady);
    }
    
    var e = document.createElement('script');
    e.type = 'text/javascript';
    e.id = 'janrainAuthWidget';
    
    if (document.location.protocol === 'https:') {
      e.src = 'https://rpxnow.com/js/lib/themailbox/engage.js';
    } else {
      e.src = 'https://widget-cdn.rpxnow.com/js/lib/themailbox/engage.js';
    }
    
    var s = document.getElementsByTagName('script')[0];
    s.parentNode.insertBefore(e, s);
    })();
    </script>

    Thanks!

    Oddly, this anonymous function is very nearly identical to the one that’s automatically generated by the WordPress plugin:

    <script type="text/javascript">
    (function() {
     if (typeof window.janrain !== 'object') window.janrain = {};
     window.janrain.settings = {};
    
     janrain.settings.tokenUrl = 'https://localhost:8888/wordpress/?action=rpx_token';
     janrain.settings.type = 'embed';
     janrain.settings.format = 'one row';
     janrain.settings.providersPerPage='7';
    
     function isReady() { janrain.ready = true; };
     if (document.addEventListener) {
     document.addEventListener("DOMContentLoaded", isReady, false);
     } else {
     window.attachEvent('onload', isReady);
     }
    
     var e = document.createElement('script');
     e.type = 'text/javascript';
     e.id = 'janrainAuthWidget';
    
     if (document.location.protocol === 'https:') {
     e.src = 'https://rpxnow.com/js/lib/your_engage_app/engage.js';
     } else {
     e.src = 'https://widget-cdn.rpxnow.com/js/lib/your_engage_app/engage.js';
     }
    
     var s = document.getElementsByTagName('script')[0];
     s.parentNode.insertBefore(e, s);
     })();
    </script>

    Which version of the WordPress plugin were you using?

    Thread Starter Debobrata

    (@debobrata)

    I used the latest version but didn’t notice that script on the plugin files. I might have had some other issues with SSL certificates.

    That’s very odd. It’s definitely there, at the top of rpx_v.php (line 401 in the latest release).

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Social login in HTTPS’ is closed to new replies.