From 4da3e50ea1752fceeef55db29e17791ee5138c12 Mon Sep 17 00:00:00 2001 From: Charley Wu Date: Sun, 14 Apr 2024 16:47:44 +0800 Subject: [PATCH] Simplify OIDC configuration for samples --- samples/AspNetCoreIdentitySample/Program.cs | 6 +----- samples/AspNetCoreReactSample/Program.cs | 6 +----- samples/AspNetCoreSample/Program.cs | 6 +----- samples/BlazorSample/Program.cs | 6 +----- samples/OwinSample/Startup.cs | 10 ++-------- 5 files changed, 6 insertions(+), 28 deletions(-) diff --git a/samples/AspNetCoreIdentitySample/Program.cs b/samples/AspNetCoreIdentitySample/Program.cs index c91a352b..369ffeae 100644 --- a/samples/AspNetCoreIdentitySample/Program.cs +++ b/samples/AspNetCoreIdentitySample/Program.cs @@ -56,13 +56,9 @@ options.ClientId = builder.Configuration["OIDC:ClientId"]; options.ClientSecret = builder.Configuration["OIDC:ClientSecret"]; options.Authority = builder.Configuration["OIDC:Authority"]; - options.MetadataAddress = builder.Configuration["OIDC:MetadataAddress"]; options.RequireHttpsMetadata = !builder.Environment.IsDevelopment(); options.SaveTokens = builder.Configuration.GetValue("OIDC:SaveTokens", false); - options.ResponseType = - builder.Configuration.GetValue("OIDC:ResponseType", OpenIdConnectResponseType.Code)!; - options.ResponseMode = - builder.Configuration.GetValue("OIDC:ResponseMode", OpenIdConnectResponseMode.Query)!; + options.ResponseType = OpenIdConnectResponseType.Code; var scope = builder.Configuration["OIDC:Scope"]; if (!string.IsNullOrWhiteSpace(scope)) { diff --git a/samples/AspNetCoreReactSample/Program.cs b/samples/AspNetCoreReactSample/Program.cs index 7d0cebc9..835475a4 100644 --- a/samples/AspNetCoreReactSample/Program.cs +++ b/samples/AspNetCoreReactSample/Program.cs @@ -91,13 +91,9 @@ await context.Options.Events.RedirectToLogout(new RedirectContext