RedirectUris 可以在生产环境中使用 localhost 吗?

May RedirectUris use localhost in production?

愚蠢的问题...在下面显示的示例中将用户重定向到本地主机 即 http://localhost:5002/signin-oidc

在我的制作中,我需要将其更改为 https://app.domain.com/signin-oidc ?

http://docs.identityserver.io/en/release/quickstarts/6_aspnet_identity.html

new Client
{
ClientId = "mvc",
ClientName = "MVC Client",
AllowedGrantTypes = GrantTypes.HybridAndClientCredentials,

RequireConsent = false,

ClientSecrets =
{
    new Secret("secret".Sha256())
},

RedirectUris           = { "http://localhost:5002/signin-oidc" },
PostLogoutRedirectUris = { "http://localhost:5002/signout-callback-oidc" },

AllowedScopes =
{
    IdentityServerConstants.StandardScopes.OpenId,
    IdentityServerConstants.StandardScopes.Profile,
    "api1"
},
AllowOfflineAccess = true
}

重定向 URL 应该可供客户端使用。

如果在生产环境中您希望与不在同一台计算机上的客户端进行通信,那么是的,这些 URL 应该可以通过您的目标网络公开访问。