且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Microsoft Graph API刷新令牌已过期

更新时间:2023-02-16 10:01:43

签出

Check out this document on default and configurable token lifetimes.

通常,刷新令牌的默认生存期为14天,对于新访问+刷新令牌对,可以将其更新长达90天. 90天后,使用默认配置,用户将不得不再次以交互方式登录到您的应用程序.

In general, the default lifetime of a refresh token is 14 days, and that can be renewed for new access + refresh token pairs for up to 90 days. After 90 days, with the default configuration, a user will have to interactively sign into your application again.

我相信您看到的错误是此刷新令牌的最大使用期限"的结果.您可以配置此设置,以使其永不过期,但是这里更安全的做法是捕获此错误,并让用户再次登录.

I believe the error you are seeing is a result of this "Refresh Token Max Age". You have the ability to configure this setting so that it will never expire, but the safer practice here would be to catch this error, and have the user sign-in again.