3

当我的服务器在本地运行(GTM + 1)时,当我将服务器置于 -8 时区时一切都很好,例如

然后我收到一条消息:

IDX12401: Expires: '[PII is hidden by default. Set the 'ShowPII' flag in IdentityModelEventSource.cs to true to reveal it.]' must be after NotBefore: '[PII is hidden by default. Set the 'ShowPII' flag in IdentityModelEventSource.cs to true to reveal it.]'.

这似乎是因为

Expires = DateTime.Now.AddMinutes(30),

... other code ...

JwtSecurityTokenHandler handler = new JwtSecurityTokenHandler();
JwtSecurityToken token = handler.CreateJwtSecurityToken(descriptor);

错误出来。奇怪的是,Expires 字段是该区域的当前时间 +30 分钟(这是配置的 +30 分钟)。这很奇怪。为什么它不允许登录并立即与该消息过期,但只有在 -X 时区,而显示的时间实际上是未来 30 分钟。

4

0 回答 0