npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@xbstracts/medusa-admin-account

v0.0.3

Published

Self-service email and password changes for Medusa admin and Mercur seller accounts.

Readme

medusa-admin-account

Reusable Medusa v2 plugin that lets the signed-in admin user or Mercur seller member change their own emailpass email and password.

Features

  • Generic Medusa admin page at /account.
  • Mercur operator admin page at /dashboard/account.
  • Mercur seller page at /seller/account.
  • Authenticated GET /admin/account/email and GET /vendor/account/email routes for the current login email.
  • Authenticated POST /admin/account/email and POST /vendor/account/email routes with exactly new_email and current_password.
  • Authenticated POST /admin/account/password and POST /vendor/account/password routes.
  • Email changes require the current password, normalize the new address to lowercase, update both the login and profile email, and sign out on success.
  • Exactly two request fields: new_password and confirm_password.
  • Eight-character minimum, exact confirmation, and sign-out after success.
  • No module, database table, or migration. Password storage remains owned by Medusa's Auth module and the configured emailpass provider.

Mercur credentials belong to the authenticated member, not the shared seller. The vendor route always resolves the caller from req.auth_context.auth_identity_id; it does not accept a target identity from the request.

For email changes, the profile update and login-identifier update run as a compensating workflow. Generic Medusa installs resolve the built-in User module. Mercur installs resolve the optional seller module at runtime to update the authenticated member. The package does not import Mercur code, and email-change requests never accept a target user, member, or auth identity.

Changing email applies immediately; the plugin does not send a verification or notification email. The previous password remains valid with the new email.

Install

Build the plugin and add it to the Medusa application's dependencies:

npm run build
plugins: [
  {
    resolve: "medusa-admin-account",
    options: {},
  },
]

The standard ./admin export includes CommonJS and ESM dashboard extensions. Mercur applications can additionally load the optional ESM-only ./vendor export. The package itself does not import Mercur runtime code.

Compatibility

  • Medusa v2: ^2.13.4
  • Medusa UI: ^4.1.1
  • Tested host: Mercur 2.1.1

Development

npm test
npm run build