npm @medusajs/medusa 2.23.1
v2.23.1: Shipping Validation, Auth Callback Hook, S3 Upload Hardening

2 hours ago

Docs MCP users can update their project using the following prompt:

Update my Medusa project to v2.23.1

Highlights

Shipping Required for Items with Shipping Profiles

Behavior change

Affects stores with product variants linked to a shipping profile. Carts containing such items now require a shipping method before the order can be placed.

Cart completion now validates that a shipping method is provided for all line items whose variants are linked to a shipping profile. If your checkout flow does not collect a shipping method for shippable items, those carts will now fail to complete after upgrading.

#17936


Auth Callback Hook with Provider Data

The auth callback workflow now has a authCallbackValidated hook after a successful OAuth validation. The hook receives the authenticated identity along with the provider's raw authentication data, enabling custom post-authentication logic such as storing OAuth tokens or syncing user attributes from the provider.

A new storeTokens option on the callback workflow lets you persist the provider's tokens directly from the hook subscriber.

#17980


Signed File Size in S3 Presigned Upload URLs

The S3 file provider now signs the file size into presigned upload URLs. S3 rejects any upload whose content length does not match the size signed into the URL, preventing unauthorized oversized uploads.

#17923

Features

  • feat(core-flows,auth): add an authCallbackValidated hook with the provider's data, and a storeTokens option by @srindom in #17980
  • feat(file-s3): sign the file size into presigned upload URLs by @peterlgh7 in #17923

Bugs

  • fix(medusa,auth,auth-emailpass,utils,types): store when password was updated for refresh and MFA validation by @shahednasser in #17779
  • fix(core-flows): only restore the reservations deleted by deleteReservationsByLineItemsStep on compensation by @NicolasGorga in #18007
  • fix(draft-order): stop capping draft order item quantities at 100 by @medusa-os-bot in #18012
  • fix(medusa): record the actor, not the email, of a password update with a reset token by @sradevski in #18013
  • fix(medusa): record the actor, not the email, of a password update with a reset token by @sradevski in #18022
  • fix(core-flows,order): apply shipping promotions on draft order edits by @medusa-os-bot in #17996
  • fix(eslint-plugin): allow assigning a hook created inside a when().then() callback by @shahednasser in #17994
  • fix(utils): fix hard delete of link rows building an empty RETURNING clause by @medusa-os-bot in #17993
  • fix(core-flows): remove shipping methods added by a canceled order change by @medusa-os-bot in #17968
  • fix(loyalty-plugin): accept comma decimal values when creating gift cards by @medusa-os-bot in #17978
  • fix(promotion): apply automatic promotions with ne rules on missing attributes by @medusa-os-bot in #17965
  • fix(inventory): release reserved quantity at old location on reservation move by @medusa-os-bot in #17962
  • fix(core-flows): validate line items in deleteLineItemsWorkflow by @shahednasser in #17963
  • fix(core-flows): don't act on an unrelated cart for a deleted payment session by @medusa-os-bot in #17946
  • fix(order): don't duplicate adjustments after undoing an order change by @medusa-os-bot in #17939
  • fix(core-flows): require shipping for order items with a shipping profile by @medusa-os-bot in #17936

Documentation

Chores

Full Changelog: v2.23.0...v2.23.1

Don't miss a new medusa release

NewReleases is sending notifications on new releases.