angular6 - 如何使用新的 Identity.UI 在 Angular 6 中设置 loginurl 以使用 asp.netcore 2.1
问题描述
如何让我的登录网址从我的 Angular 应用程序中更改...../Account/Login
为..../Identity/Account/Login
?我的客户是一个 Angular 6 应用程序,我正在使用angular-auth-oidc-client
.
谢谢
解决方案
当您调用 AddIdentityServer 时,像这样调用它
services.AddIdentityServer(SetupIdentityServer)
并使用此静态方法。
private static void SetupIdentityServer(IdentityServerOptions identityServerOptions)
{
identityServerOptions.UserInteraction.LoginUrl = "/Identity/Account/Login";
}
推荐阅读
- testng - 跳过的测试不显示在 ExtentReports 上
- kubernetes - IstIO 出口网关给出 HTTP 503 错误
- matlab - 如果尚未在数组中,则提高附加数组元素的速度
- go - 如何通过代理绕过完整性检查
- popup - 为销售订单创建脚本,但对客户记录进行字段验证
- c++ - 从二值图像中提取轮廓
- angular - 我们可以控制 ViewEncapsulation.None 影响 Angular 应用程序中的其他组件吗?
- java - 如何在JAVA中找到我现在的时间介于今天和明天的时间之间
- php - 如何使用 symfony 5 启动本地服务器或将版本降级到 4.4?
- python - add_loss() 在定义新的 keras 层时的功能是什么?