Skip to content

Commit 72dcd60

Browse files
committed
Update sample
1 parent a802049 commit 72dcd60

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

aspnetcore/security/authentication/configure-oidc-web-authentication.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -206,9 +206,10 @@ services.AddAuthentication(options =>
206206
.AddCookie()
207207
.AddOpenIdConnect(OpenIdConnectDefaults.AuthenticationScheme, options =>
208208
{
209-
options.Authority = authConfiguration["IdentityProviderUrl"];
210-
options.ClientSecret = authConfiguration["ClientSecret"];
211-
options.ClientId = authConfiguration["Audience"];
209+
var oidcConfig = builder.Configuration.GetSection("OpenIDConnectSettings");
210+
options.Authority = oidcConfig["IdentityProviderUrl"];
211+
options.ClientSecret = oidcConfig["ClientSecret"];
212+
options.ClientId = oidcConfig["Audience"];
212213
options.ResponseType = OpenIdConnectResponseType.Code;
213214

214215
options.Scope.Clear();
@@ -223,7 +224,7 @@ services.AddAuthentication(options =>
223224
options.GetClaimsFromUserInfoEndpoint = true;
224225
options.SaveTokens = true;
225226

226-
// .NET 9 feature
227+
// .NET 9 feature
227228
options.PushedAuthorizationBehavior = PushedAuthorizationBehavior.Require;
228229

229230
options.TokenValidationParameters.NameClaimType = JwtRegisteredClaimNames.Name;

aspnetcore/security/authentication/configure-oidc-web-authentication/sample/oidc-net8/RazorPageOidc/Program.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,15 @@
3333
// Both the signin and signout paths must be registered as Redirect URIs.
3434
// The default values are "/signin-oidc" and "/signout-callback-oidc".
3535

36-
//oidcOptions.CallbackPath = new PathString("/signin-oidc");
37-
//oidcOptions.SignedOutCallbackPath = new PathString("/signout-callback-oidc");
36+
//options.CallbackPath = new PathString("/signin-oidc");
37+
//options.SignedOutCallbackPath = new PathString("/signout-callback-oidc");
3838
// ........................................................................
3939

4040
// ........................................................................
4141
// The RemoteSignOutPath is the "Front-channel logout URL" for remote single
4242
// sign-out. The default value is "/signout-oidc".
4343

44-
//oidcOptions.RemoteSignOutPath = new PathString("/signout-oidc");
44+
//options.RemoteSignOutPath = new PathString("/signout-oidc");
4545
// ........................................................................
4646

4747
var oidcConfig = builder.Configuration.GetSection("OpenIDConnectSettings");

0 commit comments

Comments
 (0)