IdentityServer4 是否有提醒用户刷新令牌即将过期的机制?

Does IdentityServer4 have a mechanism to alert a user their refresh token is about to expire?

目前我的解决方案有刷新令牌,滑动超时为 1 小时,绝对超时为 6 小时。

我的要求(有人给了我,郑重声明,我不喜欢这样!)是我必须提醒用户他们的会话即将到期,如果他们想要,他们必须与系统交互继续。

IdentityServer4 有处理这个问题的机制吗?

如果没有,是否有实现此功能的首选方法?

不,没有为此内置的功能,由客户在新令牌即将过期时请求新令牌。

最简单的解决方案是使用 IdentityModel.AspNetCore NuGet package and you can read the documentation here