SAP / spartacus

Spartacus is a lean, Angular-based JavaScript storefront for SAP Commerce Cloud that communicates exclusively through the Commerce REST API.
Apache License 2.0
740 stars 384 forks source link

Wrong Redirect Upon Attempt to Save Cart and Refresh Token Expiration #13367

Open giancorderoortiz opened 3 years ago

giancorderoortiz commented 3 years ago

Setup:

  1. Set access token validity to 1 minute and refresh token validity to 3 minutes in backend (restart required)
  2. Enable express checkout in frontend
  3. Backend version: 2005.6
  4. Frontend branch: epic/oauth-improvements

Steps to Reproduce:

  1. Login to Spartacus storefront.
  2. Add n items to cart.
  3. Navigate to cart page.
  4. Click on "Save Cart for Later" button
  5. In dialog, add a cart name and description.
  6. In dialog, wait 3 minutes 10 seconds.
  7. Click on Save

Expected Results: 7.a User is redirected to login. 7.b. After successful login, cart is saved. 7.c. User is redirected to saved carts listing page.

Actual Results: 7.a. User is redirected to login 7.b. After successful login, user is redirected to cart page. 7.c. (Input entered in save cart dialog is lost)

giancorderoortiz commented 3 years ago

@bgambocjaviniar @dunqan @Xymmer

giancorderoortiz commented 3 years ago

Screen Shot 2021-08-03 at 4 50 28 PM

Screen Shot 2021-08-03 at 4 54 02 PM

Screen Shot 2021-08-03 at 4 54 25 PM

Screen Shot 2021-08-03 at 5 00 27 PM

giancorderoortiz commented 3 years ago

Har file: spartacus-devci7672_save_cart.har.zip

giancorderoortiz commented 2 years ago

@hackergil, @Xymmer can this be handled/fix for 5.0? @znikola fyi.