美文网首页人生几何?SAP
关于 SAP Spartacus Oauth token 过期时

关于 SAP Spartacus Oauth token 过期时

作者: _扫地僧_ | 来源:发表于2021-09-11 09:30 被阅读0次

I use Spartacus 3.1.1 + Commerece 2011 setup locally. I change oauth2.accessTokenValiditySeconds to 30 so that token expires in 30 seconds.

What I observe:

Scenario 1: After successfully logged in, wait for 30 seconds. Then perform whatever actions in Spartacus.

Result:There is first a 401 error for InvalidTokenError, Access token expired.

then a new token is retrieved automatically via POST to https://localhost:9002/authorizationserver/oauth/token. End user is NOT aware of this, the operation in UI goes smoothly.

Scenario 2: wait for 30 seconds, press F5 to refresh the page in Chrome.

result: there are lots of 401 and 400 error in Chrome console:




And there is an empty screen in UI. Nothing displays.

更多Jerry的原创文章,尽在:"汪子熙":


相关文章

网友评论

    本文标题:关于 SAP Spartacus Oauth token 过期时

    本文链接:https://www.haomeiwen.com/subject/ppxgmltx.html