Skip to Content

Duende IdentityServer is a very popular OAuth framework for developing SSO solutions. Whilst it provides everything you would need to implement the OAuth protocol, it is missing one key ingredient to complete your SSO solution. An Enterprise-grade management console to manage users and SSO client applications

Rock Solid Knowledge's All-in-one .NET template provides the management console (AdminUI) and a skeleton SSO solution ready for you to customize to your exact requirements. This means within less than 15 minutes of instantiating the template, you can have a solution up and running.

What is the All-In-One Template?

Rock Solid Knowledge has created a .NET template that sets up AdminUI and IdentityServer in the same .NET solution. This allows you to run IdentityServer and AdminUI directly from your IDE and get a feel for how everything hangs together. It's then only a few further steps to deploy the solution into production.

Getting Started

Before you get started, you will need:

  • A database server, either Microsoft SQL Server, MySql or PostgreSQL
    • An empty database
    • The connection string to connect to the database
  • An AdminUI license key
    • Get a demo key from here

Install the Template

To install the .NET template into your local template store, run the following command from the command line

dotnet new install Rsk.AdminAllInOne

If that worked, executing

dotnet new --list RSK

Will produce the following output

RSK AdminUI All-In-One adminui+ids [C#] Web/RSK/IdentityServer

Creating your SSO solution

  1. Launch a command prompt
  2. Navigate to the folder that will contain the solution folder.

You are now ready to instantiate the template, but you will need to supply some parameters. 

Parameters

Instantiating the Template

Run the following command from the command prompt with your preferred values.

Upon executing the above command, you will now have a folder called "MyAllInOneSolution". Inside this folder, there will be a MyAllInOneSolution.sln and two further folders

  1. MyAllInOneSolution.AdminUI
  2. MyAllInOneSolution.IdentityServer

Open the .sln file in your favourite IDE.

Set the AdminUI License Key

From inside your IDE, navigate to the appsettings.json file in the AdminUI project and locate the property LicenseKey. Replace the value **** YOUR ADMINUI LICENSE KEY *** with your own. 

Initialising the Database

You now have all the code necessary for your SSO solution, but before you can run the full solution, you will need to initialise the database. AdminUI comes with all the EF migrations necessary to create the databases. Each time you start AdminUI, it will check that the database has the correct schema and upgrade if required.

Run the AdminUI project from your IDE, If the database connection string has been configured correctly, AdminUI will run the database migrations

AdminUI will launch in your browser but fail to contact IdentityServer, as you haven't started it yet. AdminUI is an OAuth client of IdentityServer, so IdentityServer needs to be running to gain access to AdminUI.

Welcome page showing error - unable to connect to IdentityServer

Launching IdentityServer

From the IDE, run the IdentityServer project. Once launched, refresh the browser window running AdminUI. The Login button will now be enabled. Click on the Login button to redirect to IdentityServer to sign in.  

Identity Server login screen

What's next

You now have an SSO solution ready to go; all you need now is to wire up an application to use SSO. A couple of useful resources below to get you started

If you have any questions regarding the template, please email [email protected].

Nacho is a Software Developer in the Identity Team at Rock Solid Knowledge.

Related Articles