identityserver4 - 移动了我的登录页面,现在无法登录
问题描述
我将登录控件从帐户/登录移动到主页,并删除了帐户控制器及其视图。在我的机器上一切正常(当然),但是当我部署到我的测试环境时出现错误:
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,我使用 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"
}
有人有什么想法吗?也许这是我需要覆盖的硬编码?
解决方案
终于找到了。不是最好的文档...:/
var builder = services.AddIdentityServer(SetupIdentityServer)
private static void SetupIdentityServer(IdentityServerOptions
identityServerOptions)
{
identityServerOptions.UserInteraction.LoginUrl = "/";
identityServerOptions.UserInteraction.LogoutUrl = "/Home/Logout";
}
推荐阅读
- python - django.db.utils.IntegrityError:唯一约束失败:first_app_topic.top_name
- redirect - 阿帕奇配置问题
- ruby-on-rails - Rails 中如何使用“manifest.json”
- python - 如何在 Django 中添加多态类?
- opentok - TokBox/OpenTok/Vonage 流式混合 Howto
- reactjs - “React 检测到 Hook 的顺序发生了变化”
- python - 如何使用 webdriver 和 python 来提高执行时间
- emotion - @emotion/core @emotion/styled 情感主题可以与电子一起使用吗?
- amazon-web-services - 请求解除对 AWS EC2 上的端口 25 的阻塞
- javascript - 从无法正常工作的 JavaScript 传递指向 WebAssembly 的指针