人生几何?SAP

关于 SAP Spartacus Oauth token 过期时

2021-09-11  本文已影响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的原创文章,尽在:"汪子熙":


上一篇下一篇

猜你喜欢

热点阅读