Creating the Visualforce Page

Now that you have created the Controller you are ready to create the required Visualforce page.

IMPORTANT: This does not need to be done in the sandbox org. But if you want to test single sing-on with Salesforce then you will need to create it in both the sandbox and the production organization.

Navigate to Pages Page

Expand the Develop folder and click on Pages.

Create New Page

Create New Page

From the Pages page, click on New to create a new page.

Paste in Page Markup

Paste in Page Markup

You can assign the Label to whatever you like but the Name field must be sslive_login (1).

In the markup field (2), paste the text that appears below. Replace {{ScreenSteps Remote Consumer URL}} with the Remote Consumer URL you see in the authentication endpoint you created in ScreenSteps.

Click the Save button (3) to save your changes.

<apex:page controller="ScreenStepsLiveRemoteLoginController">
  <h1>Redirecting to ScreenSteps...</h1>

    var theSSLiveURL = '{{ScreenSteps Remote Consumer URL}}';
    var theOrganization = encodeURIComponent('');

    theSSLiveURL += '?first_name=' + encodeURIComponent('{!$User.FirstName}');
    theSSLiveURL += '&last_name=' + encodeURIComponent('{!$User.LastName}') + '&email=' + encodeURIComponent('{!$User.Email}');
    theSSLiveURL += '&external_id=' + encodeURIComponent('{!$User.Id}') + '&organization=' + theOrganization;
    theSSLiveURL += '&timestamp={!$CurrentPage.parameters.timestamp}' + '&hash={!md5String}';
    theSSLiveURL += '&return_to_url=' + encodeURIComponent('{!$CurrentPage.parameters.return_to_url}');

    window.location = theSSLiveURL;


Add your comment

E-Mail me when someone replies to this comment