2017-10-10 47 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應該可以在您的目標網絡上公開訪問。

相關問題