How To: Sign into your ASP.NET/MVC web site with The Identity Hub (OAuth 2.0)

Summary

In this topic you will learn the neccesary steps to allow users to login to your ASP.NET or MVC sites using The Identity Hub - {tenant} via OAuth 2.0.

Contents

  • Objectives
  • Summary of Steps
  • Step 1 - Create and configure an App for your ASP.NET/MVC web site
  • Step 2 - Download and apply the web.config file
  • Step 3 - Available Claims
  • Step 4 - Use the SDK

Objectives

  • Sign into your ASP.NET or MVC sites using The Identity Hub - {tenant}

Summary of Steps

  • Step 1 - Create and configure an App for your ASP.NET/MVC web site
  • Step 2 - Download and apply the web.config file
  • Step 3 - Available Claims
  • Step 4 - Use the SDK

Step 1 - Create and configure an App for your ASP.NET/MVC web site

In this step you will create and configure an App for your ASP.NET/MVC web site.

For more information about Apps see How To: What is an App?.

  • Navigate to the Apps Admin Page and click on New.

  • Provide the following information
    • Name: The name of the app. Give a name to identify your ASP.NET/MVC web site

    • Description: The description of the app.

  • Open the OAuth 2.0 parameters section by clicking on the arrow.

  • Provide the following information
    • Token life time: The time a token remains valid after it is created in hours and minutes.

    • Redirection Uri: One of more uri that are valid redirect uri for your application (OAuth Client). Place each url on a seperate line. Only https is allowed.

  • Click Save. You will navigate to the detail page of the just created App.


Step 2 - Download and apply the web.config file

  • Open the Web Applications (OAuth 2.0) section by clicking on the arrow.

  • Click the web.config link to download the example config

  • If you already have a config file for your ASP.NET/MVC web site, you can copy and paste the necessary sections.
  • In your ASP.NET/MVC project go to the Package Manager Console and type in

    Install-Package TheIdentityHub.AspNet


Step 3 - Use the SDK

In this step you will learn how to use the ASP.NET Server Side SDK once the user is logged in.

See Using the SDK