2017-10-10 129 views
-1

愚蠢的问题...在下面将用户重定向所示的例子为localhost 即http://localhost:5002/signin-oidc可能RedirectUris在生产中使用localhost?

在我的生产将我需要改变这 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 
} 
+1

是的,localhost只能用于客户端是Web应用程序时的测试。不要在生产中包含本地主机重定向uris。 –

回答

1

重定向的URL应该可用于客户端。

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

相关问题