问题描述
在.NET Core中,使用Open ID Connect,我试图在本地Nginx实例后面进行本地调试。
使用Nginx和主机文件设置,以便使用自定义域,例如https://example.com
用于访问本地运行的Web应用程序,而不是通常的https://localhost:<port>
我的问题是身份提供者Okta总是回叫到https://localhost:<port>/authorization-code/callback
而不是https://example.com/authorization-code/callback
。 Okta允许的回调URI中包括https://localhost:<port>
和https://example.com
。
.NET Open ID Connect库似乎自动发现了回调主机,我找不到更改它的设置,只能找到路径。
.AddOpenIdConnect(options =>
{
options.ClientId = Configuration["Okta:ClientId"];
options.ClientSecret = Configuration["Okta:ClientSecret"];
options.Authority = Configuration["Okta:Issuer"];
options.CallbackPath = "/authorization-code/callback";
options.ResponseType = "code";
options.Savetokens = true;
options.UsetokenLifetime = false;
options.GetClaimsFromUserInfoEndpoint = true;
...
Is there a setting I can use to forward the host for the callback?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)