Set up Open Authentication for TPC

IMPORTANT: This documentation and subsequent module are deprecated as of Sitefinity 10.0, OAuth integration is now handled directly through Sitefinity and The Portal Connector without any addons.

Setting up TPC for Open Authentication

  1. Ensure that the .dll for The Portal Connector OAuth is in the bin folder of your web application project. The .dlls for The Portal Connector OAuth are contained in a separate .zip folder, typically called TPC_OAuth_#.#.####.##.zip where the numbers refer to the Sitefinity version.

  2. After adding the .dll for OAuth, you will have to ensure that the correct code is added to the web.config of your website. Open the web.config of your website and add the following code inside of the <runtime> and <assemblybinding> tags:

    <dependentAssembly>
            <assemblyIdentity name="DotNetOpenAuth.AspNet" publicKeyToken="2780ccd10d57b246" culture="neutral"/>
            <bindingRedirect oldVersion="0.0.0.0-4.3.0.0" newVersion="4.3.0.0"/>
          </dependentAssembly>
          <dependentAssembly>
            <assemblyIdentity name="DotNetOpenAuth.Core" publicKeyToken="2780ccd10d57b246" culture="neutral"/>
            <bindingRedirect oldVersion="0.0.0.0-4.3.0.0" newVersion="4.3.0.0"/>
         </dependentAssembly>
    

  3. Navigate to your Sitefinity backend.

  4. Navigate to the Module & Services page located underneath the Administration menu. (Figure 1)



  5. Scroll down to ‘The Portal Connector Open Authentication’ module in the list below and click on the ‘Actions’ drop down list located towards the right of the list entry. Then, click ‘Install’ to install the module. (Figure 2)



Setting up Google+ Authentication

  1. Navigate to https://console.developers.google.com/project and sign into Google if necessary.

  2. This page contains all of the projects you have created for Google Dev. In order to get started, click on the ‘Create project’ button located at the top of the page (Figure 3). Fill out a project name in the provided dialogue window. Once you click the ‘Create’ button, you will be redirected to the dashboard page. (Figure 4)





  3. Once on the dashboard, there will be a blue box located underneath the name of your project. Click on the ‘Enable and manage APIs’ button to be redirected to the APIs page. (Figure 5)



  4. Locate and click on the ‘Google+ API’ located underneath the Social APIs header. Click ‘Enable API’ to enable this API. This is the only one you will need for Open Authentication through Google to work. (Figure 6)



  5. You will be required to configure credentials in order for the authentication to work. Click on the credentials menu option located underneath the left menu to set them up.

  6. First, click on the ‘OAuth Consent Screen’. This is what will be shown to your user when they attempt to log into your website. You will have to set the Product Name in order to create any credentials. (Figure 7)



  7. First, create an ‘OAuth Client Id’ credential by clicking on the ‘New Credentials’ button. This will allow your website to access the user’s account information so that they can log in. (Figure 8)



  8. Specify the application type as ‘Web Application’, this will open up an extra form for you to enter more information. Underneath restrictions, you must specify the base URL of your site (No wildcards or subdirectories) as the Authorized JavaScript origins.

    Secondly, you must specify the Sitefinity Authentication URL as the Authorized Redirect URL, which is your base URL with '/Sitefinity/Authenticate/SWT' appended on the end. (Figure 9)



  9. Once you click ‘Create’, a dialogue box will pop up displaying the ‘Client Id’ and ‘Client Secret’ for your web application. Make sure to save these.

  10. You’re now ready to configure your Portal Connector web application for Google authentication. ( Please see: Configuring Your Sitefinity Web Application for Authentication )

Setting up LinkedIn Authentication

  1. Sign into LinkedIn and navigate to https://developer.linkedin.com/

  2. Click on the My Apps menu option located at the top of the page. (Figure 10)



  3. Once you’re on the ‘My Applications’ page, click the yellow ‘Create Application’ button to get started.

  4. Next, fill out the provided form and click submit. (Figure 11)



  5. You will be redirected to the dashboard of your new application which will also contain your ‘Client Id’ and ‘Client Secret’. Please make sure that the r_emailaddress checkbox underneath ‘Default Application Permissions’ is checked.

    Secondly, make sure that the Authorized Redirect URLs contains both your base URL and Sitefinity Authentication URL, which is just your base URL with '/Sitefinity/Authenticate/SWT' appended on the end before clicking update. (Figure 12)



  6. You’re now ready to configure your Portal Connector web application for LinkedIn authentication! ( Please see: Configuring Your Sitefinity Web Application for Authentication )

Setting up Facebook Authentication

  1. Log into Facebook and navigate to https://developers.facebook.com/

  2. Located in the top-right corner of the page is a dropdown list labeled ‘My Apps’. Click on this dropdown list and click on the ‘Add a New App’ option to get started. (Figure 13)