首页 > 解决方案 > Aws Cognito Oauth2:刷新令牌轮换

问题描述

我们将 Aws Cognito 与 Oauth 2.0 一起使用,我们想知道 cognito 是否支持根据 Oauth 2.0 规范 ( https://www.rfc-editor.org/rfc/rfc6819 ) 刷新令牌轮换:

基本思想是在每次刷新请求时更改刷新令牌值,以检测使用旧刷新令牌获取访问令牌的尝试

当我们使用 Aws .net sdk 刷新我们的令牌时:

await user.StartWithRefreshTokenAuthAsync(authRequestRefresh).ConfigureAwait(false);

...我们没有得到新的刷新令牌。获取新刷新令牌的唯一方法是进行新登录:

await user.StartWithSrpAuthAsync(authRequest).ConfigureAwait(false);

谢谢你的帮助!

亲切的问候,彼得

标签: oauth-2.0amazon-cognitorefresh-token

解决方案


Cognito 不支持刷新令牌轮换。但是,您可以更改刷新令牌对应用程序客户端保持有效的天数。


推荐阅读