• Hello,

    The Salesforce SSO Authorisation does not work in WordPress multisite environments.

    The error that it comes up with is (redirect_uri_mismatch:redirect_uri must match configuration).

    When checking your plugin’s code in detail, we found a bug that’s causing this, please see details below.

    Plugin version 1.5.1 tested
    ?
    Once we click to “Authenticate with Salesforce” button, your code will parse the correct URL using JavaScript. The authentication pop-up comes up, and even after a successful authentication (&status=success is in the URL) the plugin sends a wrong URL for authorization_code (missing subdomain from URL due to PHP_SELF and requesting HTTP not HTTPS).
    ?
    Please check and update the /includes/pardot-settings-class.php line #453:
    Wrong: ‘redirect_uri’ => ‘https://’.$_SERVER[‘HTTP_HOST’].$_SERVER[‘PHP_SELF’]
    Correct: ‘redirect_uri’ => ( isset( $_SERVER[‘HTTPS’] ) && $_SERVER[‘HTTPS’] === ‘on’ ? “https://” : “https://”) . $_SERVER[‘HTTP_HOST’] . $_SERVER[‘REQUEST_URI’]
    ?
    The above solution might help others to setup SSO authentication on subdirectory multisite environment too (you will need to do custom modifications to the Pardot plugin to get this working > this is a temporary solution whilst waiting for the official Pardot plugin team to fix this, hopefully in the next release).

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Salesforce SSO Authentication does not work in Multisite environments’ is closed to new replies.