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 πŸ™

Β© 2025 – Pkg Stats / Ryan Hefner

@vymalo/medusa-argon2

v1.0.9

Published

πŸ” Enhanced password hashing for MedusaJS using the Argon2 algorithm - the most advanced and secure password hashing method.

Readme

MedusaJS Argon2 Authentication Plugin

πŸ” Enhanced password hashing for MedusaJS using the Argon2 algorithm - the most advanced and secure password hashing method.

🌟 Features

  • Utilizes Argon2, the winner of the Password Hashing Competition
  • Highly configurable password hashing
  • Provides robust protection against various password cracking techniques
  • Seamless integration with MedusaJS authentication

πŸ›‘οΈ Why Argon2?

Argon2 offers superior security compared to traditional hashing methods:

  • Resistant to GPU and ASIC cracking attempts
  • Configurable memory, time, and parallelism costs
  • Adaptable to changing computational power
  • Recommended by leading security experts

πŸ“¦ Installation

Install the package using npm:

npm install @vymalo/medusa-argon2

Or using yarn:

yarn add @vymalo/medusa-argon2

πŸš€ Usage

Add the plugin to the modules section of your MedusaJS configuration:

modules: [
  {
    resolve: '@medusajs/medusa/auth',
    options: {
      providers: [
        {
          resolve: '@vymalo/medusa-argon2',
          id: 'emailpass', // Yes, `emailpass`, as the goal is to override the default 
          options: {
            // Optional configuration parameters
            argon2: {
              timeCost: 3,
              memoryCost: 12288, // 12 MB
              parallelism: 1
            }
          },
        },
      ],
    },
  },
  // Other modules...
]

πŸ”§ Configuration Options

The plugin supports full Argon2 configuration:

interface Argon2Options {
  hashLength?: number;      // Length of the hash output (default: secure)
  timeCost?: number;        // Number of iterations (higher = more secure)
  memoryCost?: number;      // Memory usage in KB (higher = more secure)
  parallelism?: number;     // Number of parallel threads
  type?: 0 | 1 | 2;         // Argon2 variant (d, i, or id)
  version?: number;          // Argon2 version
  
  // Advanced options
  salt?: Buffer;             // Custom salt (usually auto-generated)
  associatedData?: Buffer;   // Additional context data
  secret?: Buffer;           // Secret key for additional security
}

Recommended Configuration

  • timeCost: Minimum 3, increase for more security
  • memoryCost: At least 12288 KB (12 MB)
  • parallelism: 1-4 depending on your server
  • type: Recommended 2 (Argon2id - hybrid mode)

πŸ›‘οΈ Security Recommendations

  • Always use environment variables for sensitive configurations
  • Periodically review and adjust hashing parameters
  • Monitor computational resources and update costs as hardware evolves

🀝 Contributing

Contributions are welcome! Please submit pull requests or open issues.

πŸ”’ Security Reporting

If you discover a security vulnerability, please send an email to [your security contact].

πŸ“„ License

Check the license

πŸ”— Related Projects