移动了我的登录页面,无法立即登录

时间:2018-08-02 03:37:08

标签: identityserver4 angular-auth-oidc-client

我将登录控件从帐户/登录名移到了主页,并删除了帐户控制器及其视图。一切都可以在我的机器上正常运行(当然),但是当我部署到测试环境时,我会收到错误消息:

No webpage was found for the web address: https://identity.blah.blah/account/login?returnUrl=%2Fconnect%2Fauthorize%2Fcallback%3Fclient_id%3Dclient.js%26redirect_uri%3Dhttp%253A%252F%252Fblah.blah%26respons etc

我的前端是Angular 6和Im,使用angular-auth-oidc-client。

我的代码中没有任何内容可以创建此url。 sts服务器的URL只是根uri,没有帐户/登录名。

{ "stsServer":"https://identity.blah.blah", "redirect_url":"http://app.blah.blah", "client_id":"app.client.js", "response_type":"id_token token", "scope":"openid profile api.v1", "post_logout_redirect_uri":"http://app.blah.blah", "start_checksession":true, "silent_renew":true, "startup_route":"/", "forbidden_route":"/forbidden", "unauthorized_route":"/unauthorized", "log_console_warning_active":true, "log_console_debug_active":false, "max_id_token_iat_offset_allowed_in_seconds":"10" }

有人有什么想法吗?也许这是我需要重写的地方的硬编码?

1 个答案:

答案 0 :(得分:0)

终于找到了。不是最好的文档...:/

var builder = services.AddIdentityServer(SetupIdentityServer)

private static void SetupIdentityServer(IdentityServerOptions 
  identityServerOptions)
{
  identityServerOptions.UserInteraction.LoginUrl = "/";
  identityServerOptions.UserInteraction.LogoutUrl = "/Home/Logout";
}