github medusajs/medusa v2.0.6-preview

latest releases: v2.0.9-preview, v1.20.10, v2.0.8-preview...
20 days ago

Highlights

Introduced identity registration in auth domain

🚧 Breaking change

We have separated identity registration from authentication. For context about why this decision was made see #8683.

Introduced endpoint /auth/[scope]/[provider]/register

We have added an endpoint specifically for registering new identities. This change will only be used by providers that require registration, such as email-password.

Introduced method register in auth provider and auth module

We have introduced a new method register to the auth provider and auth module interfaces. This change will only be used by providers that require registration, such as email-password.

Examples of new authentication flows

Sign up with email-password:

POST /admin/invites -> admin creates invite
POST /auth/user/emailpass/register -> user registers identity
POST /admin/invites/accept -> invite is accepted passing the invite + auth token 

Sign in with email-password:

POST /auth/user/emailpass -> authenticate with email-password
GET /admin/users/me -> get authenticated user

Sign up with Google:

POST /auth/user/google -> redirects to Google auth
POST /auth/user/google/callback -> Google hits callback URL, authenticates, and responds with user
POST /admin/invites/accept -> invite is accepted passing the invite + auth token 

Sign up with Google:

POST /auth/user/google -> redirects to Google auth
POST /auth/user/google/callback -> Google hits callback URL, authenticates, and responds with user
GET /admin/users/me -> get authenticated user

Sign up as customer with email-password:

POST /auth/customer/emailpass/register -> customer registers identity
POST /store/customers -> customer is created

Sign in with email-password:

POST /auth/customer/emailpass -> authenticate customer with email-password

CLI commands to manage database operations

We have added a new namespace to our CLI specifically for database operations db:.

Alongside the namespace, a range of new commands have been introduced:

  • db:create: The command creates the database (if it is missing) and updates the .env file
  • db:migrate: This command will run the migrations and sync the links, unless --skip-links flag is specified
  • db:rollback: Rolls-back last batch of migrations for one or more selected modules
  • db:generate: Generates migrations for one or more selected modules
  • db:sync-links: Ensures links between modules are in sync

Events

We have (re)introduced events in the product domain:

"product-category.created"
"product-category.updated"
"product-category.deleted"
"product-collection.created"
"product-collection.updated"
"product-collection.deleted"
"product-variant.updated"
"product-variant.created"
"product-variant.deleted"
"product.updated"
"product.created"
"product.deleted"

Documentation: Redesign completed

We have completed redesigning our documentation for Medusa 2.0, which includes an updated layout and a range of new components improving the overall user experience.

Explore the updated documentation here.

Documentation: Re-introduced AI assistant (beta)

We have (re)introduced our AI assistant for Medusa 2.0 to help guide you through our documentation and find what you are looking for as fast as possible.

Try out the new AI assistant here.

Features

  • feat(dashboard): Hitting escape restores previous value by @kasperkristensen in #8654
  • feat(workflows-sdk): log on error by @carlos-r-l-rodrigues in #8666
  • feat(dashboard,core-flows,js-sdk,types,link-modules,payment): ability to copy payment link by @riqwan in #8630
  • feat(dashboard): Wrap each route in an ErrorBoundary by @kasperkristensen in #8674
  • feat(core-flows): create or update payment collections in RMA flows by @riqwan in #8676
  • feat(dashboard,core-flows,js-sdk,types): ability to mark payment as paid by @riqwan in #8679
  • feat(dashboard,core-flows): ability to refund payment post RMA flow by @riqwan in #8685
  • fix(core-flows): account for unfulfilled items while generating order status by @riqwan in #8698
  • feat(dashboard): add activities for order - claim, exchange, payment by @riqwan in #8702
  • feat(core-flows): order edit request by @carlos-r-l-rodrigues in #8705
  • chore(order): align mikroorm <> order module by @riqwan in #8710
  • feat(fulfillment,order): add created_by fields to fulfillment, return, claim, exchange by @riqwan in #8711
  • feat(medusa,types,core-flows): apply created_by values - claims, exchanges, returns, fulfillment by @riqwan in #8712
  • feat: add missing crud to provider identity service by @christiananese in #8717
  • feat(utils): use dotenv-expand to allow variables within env by @shahednasser in #8720
  • feat(dashboard): order edit UI by @fPolic in #8700
  • feat(core-flows,dashboard): adds item validations for claims, returns and exchanges by @riqwan in #8735
  • feat(create-medusa-app): set database name to project name by @shahednasser in #8727
  • feat(dashboard,types): add active order change panel - claims, exchanges & returns by @riqwan in #8738
  • feat: add env editor utility to edit update .env files by @thetutlage in #8741
  • feature: add db:create command by @thetutlage in #8760
  • fix(dashboard): summary section return fixes by @fPolic in #8770
  • feat: add sync links command by @thetutlage in #8775
  • feat: move migrations commands to the new db namespace by @thetutlage in #8810
  • feat: create auth provider identity by @christiananese in #8675
  • feat: Separate registration from authentication in auth domain by @olivermrbl in #8683
  • feat(dashboard): cancel return request by @fPolic in #8761

Bugs

Documentation

Chores

New Contributors

Full Changelog: v2.0.5-preview...v2.0.6-preview

Don't miss a new medusa release

NewReleases is sending notifications on new releases.