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 sign-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 Visualforce Pages.

Create New Page

Create New Page

From the Visualforce 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=' + '{!JSENCODE(URLENCODE($User.FirstName))}';
    theSSLiveURL += '&last_name=' + '{!JSENCODE(URLENCODE($User.LastName))}' + '&email=' + '{!JSENCODE(URLENCODE($User.Email))}';
    theSSLiveURL += '&external_id=' + '{!JSENCODE(URLENCODE($User.Id))}' + '&organization=' + theOrganization;
    theSSLiveURL += '&timestamp={!JSENCODE(URLENCODE($CurrentPage.parameters.timestamp))}' + '&hash={!JSENCODE(URLENCODE(md5String))}';
    theSSLiveURL += '&return_to_url=' + '{!JSENCODE(URLENCODE($CurrentPage.parameters.return_to_url))}';
    theSSLiveURL += '&redirect_uri=' + '{!JSENCODE(URLENCODE($CurrentPage.parameters.redirect_uri))}';
    theSSLiveURL += '&response_type=' + '{!JSENCODE(URLENCODE($CurrentPage.parameters.response_type))}';
    theSSLiveURL += '&client_id=' + '{!JSENCODE(URLENCODE($CurrentPage.parameters.client_id))}';
    window.location = theSSLiveURL;


Add your comment

E-Mail me when someone replies to this comment

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Previous Article Creating the Controller
Next Article Setting Permissions for the Visualforce Page
Still Need Help? Contact Us