Skip to content
 
 

Latest commit

 

History

350 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

eShop on Abblix OIDC Server: a worked IdentityServer migration for .NET 10

Microsoft's eShop reference application with its OpenID Connect provider migrated from Duende IdentityServer to Abblix OIDC Server. Everything else is upstream: the same .NET Aspire orchestration, the same Blazor storefront, the same microservices, the same APIs.

Clone it to see what moving an ASP.NET Core identity provider off IdentityServer actually touches: client and scope registration, the login and logout screens, claim mapping, signing keys and token persistence. On the consuming side it touches almost nothing. No resource server was modified and no authority URL changed; the two client applications gained four statements between them, so that each names in full the scopes it requests. Every step is explained, with the alternatives that were rejected and why, in the step-by-step migration guide.

Why this fork exists

Trying an identity library is normally expensive: you find out what it costs only after you have wired it into your own system, and by then you have paid for the answer. This fork moves that expense somewhere else. eShop is public and familiar to most .NET developers, it runs IdentityServer upstream, and both versions build and run, so the whole comparison is a diff between two commits of an application you already know rather than a plan you have to imagine.

It is not an argument for leaving Duende IdentityServer. That is a mature product with a decade of production behind it, and a system running well on it has no reason here. What this fork offers is the other half of the decision, the one a data sheet cannot give: what the move actually touches, and where a library that ships fewer batteries hands work back to you.

If you do have your own reason to move, or you are simply looking at what else the ecosystem offers and would rather try one than read about it, this is the fork to clone and study. It runs on your machine in a few minutes, and every decision behind it is written up in the guide.

The reasoning behind each step, including the alternatives rejected and why, is in the step-by-step migration guide.

Unofficial fork. Maintained by Abblix LLP. Not affiliated with, endorsed by, or supported by Microsoft or the .NET Foundation; their names and logos remain their respective owners'. The upstream code stays under its original MIT licence, reproduced unchanged in LICENSE. Abblix OIDC Server is a separate product under its own licence, consumed here as a NuGet package.

What eShop is

A reference .NET application implementing an e-commerce website using a services-based architecture using .NET Aspire.

eShop Reference Application architecture diagram

eShop homepage screenshot

Getting Started

This version of eShop is based on .NET 10.

Upstream, including its earlier releases: dotnet/eShop.

Prerequisites

Windows with Visual Studio

Mac, Linux, & Windows without Visual Studio

Note: When running on Mac with Apple Silicon (M series processor), Rosetta 2 for grpc-tools.

Running the solution

Warning

Remember to ensure that Docker is started

  • (Windows only) Run the application from Visual Studio:
  • Open the eShop.Web.slnf file in Visual Studio
  • Ensure that eShop.AppHost.csproj is your startup project
  • Hit Ctrl-F5 to launch Aspire
  • Or run the application from your terminal:
dotnet run --project src/eShop.AppHost/eShop.AppHost.csproj

then look for lines like this in the console output in order to find the URL to open the Aspire dashboard:

Login to the dashboard at: http://localhost:19888/login?t=uniquelogincodeforyou

You may need to install ASP.NET Core HTTPS development certificates first, and then close all browser tabs. Learn more at https://aka.ms/aspnet/https-trust-dev-cert

Sign in to the storefront as alice or bob, password Pass123$. Both are created on first run by UsersSeed.cs. The login screen you land on is the application's own page, Login.cshtml: Abblix OIDC Server answers the protocol endpoints and knows only where to send an unauthenticated user, which is the boundary this fork was built to show. What it issues afterwards is the token behind the claims the checkout form fills itself from.

Azure Open AI

When using Azure OpenAI, inside eShop.AppHost/appsettings.json, add the following section:

  "ConnectionStrings": {
    "OpenAi": "Endpoint=xxx;Key=xxx;"
  }

Replace the values with your own. Then, in the eShop.AppHost Program.cs, set this value to true

bool useOpenAI = false;

Here's additional guidance on the .NET Aspire OpenAI component.

Use Azure Developer CLI

You can use the Azure Developer CLI to run this project on Azure with only a few commands. Follow the next instructions:

  • Install the latest or update to the latest Azure Developer CLI (azd).
  • Log in azd (if you haven't done it before) to your Azure account:
azd auth login
  • Initialize azd from the root of the repo.
azd init
  • During init:

    • Select Use code in the current directory. Azd will automatically detect the .NET Aspire project.
    • Confirm .NET (Aspire) and continue.
    • Select which services to expose to the Internet (exposing webapp is enough to test the sample).
    • Finalize the initialization by giving a name to your environment.
  • Create Azure resources and deploy the sample by running:

azd up

Notes:

  • The operation takes a few minutes the first time it is ever run for an environment.
  • At the end of the process, azd will display the url for the webapp. Follow that link to test the sample.
  • You can run azd up after saving changes to the sample to re-deploy and update the sample.
  • Report any issues to azure-dev repo.
  • FAQ and troubleshoot for azd.

Contributing

This is a demonstration fork, and the two halves have different homes. Anything about eShop itself belongs upstream at dotnet/eShop: changes made here would not reach the people maintaining it. Anything about the migration or the Abblix provider under it is welcome as an issue in this repository.

Sample data

The sample catalog data is defined in catalog.json. Those product names, descriptions, and brand names are fictional and were generated using GPT-35-Turbo, and the corresponding product images were generated using DALL·E 3.

eShop on Azure

For a version of this app configured for deployment on Azure, please view the eShop on Azure repo.

About

Microsoft's eShop reference application with its OpenID Connect provider migrated from Duende IdentityServer to Abblix OIDC Server. A worked ASP.NET Core identity provider migration on .NET 10 with Aspire, explained step by step. Unofficial fork, not affiliated with Microsoft or the .NET Foundation.

Topics

Resources

Code of conduct

Contributing

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages