1. Create a Node.js starter application and add the Single Sign On service

  1. Log in to Bluemix and click Apps > Cloud Foundry Apps. Then, click Create Cloud Foundry App.
  2. Select the SDK for Node.js runtime.
  3. Provide a unique application name. Each application in Bluemix public requires a unique name. To ensure that your app name is unique, add the date and your initials to the name. Then, click Create.
    Note: If you see an Upgrade button instead of the Create button, you are using a Bluemix account that does not have access to paid services. Review the remaining steps in the lab to understand how to use this service and consider upgrading your Bluemix account if you will need to use the SSO service in production.

    Bluemix will show the application’s Getting Started page with a message at the top about the application starting the staging process.

  4. If the Cloud Foundry CLI tool is not installed on your workstation, click Download CF Command Line Interface to download the current version for your workstation. It will be later than 6.9, but that is OK. After the download is complete, install the cf CLI tool.
  5. Scroll down on the same page to the series of numbered steps starting with the Download Starter Code button. Make a note of these steps: they might not match the picture and instead will be customized for your Bluemix ID, current Bluemix space, and application name.Complete steps 1 and 2 as shown to get a command prompt with a copy of your code. You will use this command prompt to add the node passport module to the starter application later.


    Next, you will add the Single Sign On service to the dashboard.

  6. Create an ID that will become the prefix of the URL for the service. This ID can be up to 32 characters and must start with an alphabetic character. Make a note of it.
  7. Click Catalog in the Bluemix navigation bar and then enter Single Sign On into the Search field.
  8. Click Single Sign On. This will show a configuration window for adding the service.
  9. On the left side, confirm that Leave unbound is shown. You can change the service name that will be shown in the dashboard or leave the default. Then, click Create.
  10. Enter a name for the service. This is the ID that you created earlier in step 6 above. It is not the name that was shown in the previous window as the Service name. Click Continue.
    This will add the service to the dashboard. Now, you can create a simple cloud directory and add a test user for external authentication in the next section.
    This will add the service to the dashboard. Now, you can create a simple cloud directory and add a test user for external authentication in the next section.