You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unauthenticated carts get updated to authenticated when a cart is active and a user signs in. If the user has a specified price list, the cart is updated to the price list prices, and the cart gets the customer_id object assigned.
If the user then signs out of the storefront, the cart is not updated to the unauthenticated prices, and the backend continues to return the same cart (presumably because the client stores the cart ID in the client cookies).
Expected behavior
I expected the backend to not allow access to the authenticated cart without an authentication session, and to reply that there is no cart, or an error that the client can recover from by deleting the cart cookie.
Actual behavior
The cart with the authenticated price list prices is offered instead, resulting in weird behavior where the line items are shown with the correct price, but the total prices uses the price list prices.
Package.json file
Node.js version
v22.11.0
Database and its version
PostgreSQL 16.6 (Ubuntu 16.6-0ubuntu0.24.10.1)
Operating system name and version
Ubuntu on Raspberry pi
Browser name
Arc
What happended?
Unauthenticated carts get updated to authenticated when a cart is active and a user signs in. If the user has a specified price list, the cart is updated to the price list prices, and the cart gets the customer_id object assigned.
If the user then signs out of the storefront, the cart is not updated to the unauthenticated prices, and the backend continues to return the same cart (presumably because the client stores the cart ID in the client cookies).
Expected behavior
I expected the backend to not allow access to the authenticated cart without an authentication session, and to reply that there is no cart, or an error that the client can recover from by deleting the cart cookie.
Actual behavior
The cart with the authenticated price list prices is offered instead, resulting in weird behavior where the line items are shown with the correct price, but the total prices uses the price list prices.
Link to reproduction repo
https://github.com/medusajs/medusa
The text was updated successfully, but these errors were encountered: