asp.net-core - 使用外部提供者登录时增加超时
问题描述
我使用 ASP.NET Core 5 Identity 和 Google 作为外部登录。
登录 Google 后,返回应用程序时出现 500 错误。
在我的应用程序中访问回调 url "/signin-google" 时发生错误。
检查错误详细信息时,它说这是一个 60 秒超时错误。
如何检查真正的错误是什么?我尝试使用以下方法增加超时:
我在我的应用程序启动ConfigureServices
方法中尝试过:
services.AddAuthentication(CookieAuthenticationDefaults.AuthenticationScheme)
.AddGoogle("Google", x => {
x.ClientId = clientId;
x.ClientSecret = clientSecret;
x.RemoteAuthenticationTimeout = TimeSpan.FromSeconds(240);
});
但奇怪的是,我得到了同样的 60 秒超时错误。
解决方案
如何检查真正的错误是什么?我尝试使用以下方法增加超时:
您需要更改时间BackchannelTimeout
。
推荐阅读
- python - 为在 Gunicorn 上运行的 Flask-SQLAlchemy 应用程序选择 DB pool_size
- sql - 如何使用带有 MONEY 数据类型的 WHERE 子句?
- javascript - 包含的页面 javascript 范围
- python - Python 正则表达式忽略空行
- javascript - 单击时自动重新加载延迟
- r - 关于tidygraph中复制失败的问题
- .net - 如何使用默认基地址配置 WCF 服务?
- reactjs - 如何在 React 应用程序中提交时将一个对象从一个数组移动到另一个数组
- android - 使用 Android Studio 将 SQLite 中的数据显示为动态卡片
- html - mouseover/mouseout Angular 上的最佳方式样式