From 313bfd1ff9efb829deff7cbc409cdb28773177da Mon Sep 17 00:00:00 2001 From: Brian Demers Date: Thu, 14 Jan 2021 16:19:10 -0500 Subject: [PATCH] Adds "AuthorizationServerId" property to example This is required to support Okta Authorization servers that are NOT named "default" --- okta-aspnetcore-mvc-example/Startup.cs | 3 ++- okta-aspnetcore-mvc-example/appsettings.json | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/okta-aspnetcore-mvc-example/Startup.cs b/okta-aspnetcore-mvc-example/Startup.cs index 5009605..16873ef 100644 --- a/okta-aspnetcore-mvc-example/Startup.cs +++ b/okta-aspnetcore-mvc-example/Startup.cs @@ -31,7 +31,8 @@ public void ConfigureServices(IServiceCollection services) .AddOktaMvc(new OktaMvcOptions { // Replace these values with your Okta configuration - OktaDomain = Configuration.GetValue("Okta:OktaDomain"), + OktaDomain = Configuration.GetValue("Okta:OktaDomain"), + AuthorizationServerId = Configuration.GetValue("Okta:AuthorizationServerId", "default"), ClientId = Configuration.GetValue("Okta:ClientId"), ClientSecret = Configuration.GetValue("Okta:ClientSecret"), Scope = new List { "openid", "profile", "email" }, diff --git a/okta-aspnetcore-mvc-example/appsettings.json b/okta-aspnetcore-mvc-example/appsettings.json index 403ce22..8e7a9c6 100644 --- a/okta-aspnetcore-mvc-example/appsettings.json +++ b/okta-aspnetcore-mvc-example/appsettings.json @@ -8,6 +8,7 @@ }, "Okta": { "OktaDomain": "${CLI_OKTA_ORG_URL}", + "AuthorizationServerId": "${CLI_OKTA_ISSUER_ID}", "ClientId": "${CLI_OKTA_CLIENT_ID}", "ClientSecret": "${CLI_OKTA_CLIENT_SECRET}" }