config the issuer url

This commit is contained in:
Paul Schneider 2025-07-10 09:16:58 +01:00
commit cf5bef475d
4 changed files with 48 additions and 137 deletions

View file

@ -16,6 +16,7 @@ using Microsoft.AspNetCore.Authentication;
JwtSecurityTokenHandler.DefaultMapInboundClaims = false;
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddControllersWithViews();
@ -28,8 +29,7 @@ builder.Services
.AddCookie("Cookies")
.AddOpenIdConnect("oidc", options =>
{
options.Authority = "https://localhost:5001";
options.Authority = builder.Configuration.GetValue<String>("AuthIssuer");
options.ClientId = "mvc";
options.ClientSecret = "49C1A7E1-0C79-4A89-A3D6-A37998FB86B0";
options.ResponseType = "code";
@ -47,6 +47,7 @@ builder.Services
using (var app = builder.Build())
{
if (app.Environment.IsDevelopment())
app.UseDeveloperExceptionPage();
else