LinkedIn OAuth 访问令牌刷新不会增加过期时间



我使用以下过程刷新LinkedIn oauth2 访问令牌

https://developer.linkedin.com/docs/oauth2#refresh

在浏览器中启动 oauth 过程后,将按所述跳过对话框,并发出一个新代码,然后我使用该代码获取新的不同access_token。但是,expires_in字段(到期前的秒数)小于前access_token的字段,因为它实际上引用了相同的到期日期。

这意味着到期日期实际上尚未延长,这是刷新访问令牌的目的。

刷新访问令牌是否会延长过期时间?
还是我在这里缺少什么?(也许到期日期只能在使用一定时间后延长?

expires_in将始终与前一个access_token相同expires_in因为这只是令牌有效的过期次数。我不知道这个值LinkedIn返回什么,但我猜你每次都看到一个不错的整数?

https://www.rfc-editor.org/rfc/rfc6749#section-4.2.2

expires_in

     RECOMMENDED.  The lifetime in seconds of the access token.  For
     example, the value "3600" denotes that the access token will
     expire in one hour from the time the response was generated.
     If omitted, the authorization server SHOULD provide the
     expiration time via other means or document the default value.

最新更新