diff --git a/src/Server/Program.cs b/src/Server/Program.cs index 1932740..0f50cef 100644 --- a/src/Server/Program.cs +++ b/src/Server/Program.cs @@ -55,20 +55,21 @@ options.Password.RequireNonAlphanumeric = false; options.User.RequireUniqueEmail = true; options.SignIn.RequireConfirmedAccount = true; - - // Needed for .NET 6 Identity/ASP.NET Core bug - https://github.com/dotnet/core/blob/main/release-notes/6.0/known-issues.md#spa-template-issues-with-individual-authentication-when-running-in-production - // TODO: Revisit in .NET 7 - var issuerUri = builder.Configuration.GetValue("IdentityServer:IssuerUri"); - if (!string.IsNullOrEmpty(issuerUri)) - { - options.Tokens.AuthenticatorIssuer = issuerUri; - } }) .AddRoles() .AddEntityFrameworkStores() .AddClaimsPrincipalFactory(); - builder.Services.AddIdentityServer() + builder.Services.AddIdentityServer(options => + { + // Needed for .NET 6 Identity/ASP.NET Core bug - https://github.com/dotnet/core/blob/main/release-notes/6.0/known-issues.md#spa-template-issues-with-individual-authentication-when-running-in-production + // TODO: Revisit in .NET 7 + var issuerUri = builder.Configuration.GetValue("IdentityServer:IssuerUri"); + if (!string.IsNullOrEmpty(issuerUri)) + { + options.IssuerUri = issuerUri; + } + }) .AddApiAuthorization(); builder.Services.AddTransient();