• Сообщество
  • Блог
Документация
Плагины и интеграцииВсе расширения для Medusa от сообществаЭкспертыПодберите специалиста для разработки и развития вашего проекта на Medusa
КейсыПосмотрите примеры Medusa в продакшене и успешные внедрения
Меч Moscow
Комплексная e-commerce платформа на Medusa для московского fashion-бренда

Меч Moscow · Fashion

Gorgo снижает затраты на адаптацию Medusa к локальным рынкам.

Мы разрабатываем плагины интеграции, осуществляем поддержку и развиваем сообщество разработчиков на Medusa в Telegram.

  • Ресурсы Medusa
  • Плагины и интеграции
  • Эксперты
  • Кейсы
  • Medusa Чат в Telegram
  • Medusa Новости в Telegram
  • Документация Gorgo
  • Связаться с нами
  • TelegramGitHub
Плагины
Argon2 logo

Argon2

Добавить расширенное хеширование паролей Argon2

npm install @vymalo/medusa-argon2
Категория
Авторизация
Создано
Vymalo
Версия
1.0.9
Последнее обновление
1 год назад
Ежемесячные загрузки
Загрузка данных
Звезды на Github
12
npmNPMGitHubGithub

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 section of your MedusaJS configuration:

1modules: [
2 {
3 resolve: '@medusajs/medusa/auth',
4 options: {
5 providers: [
6 {
7 resolve: '@vymalo/medusa-argon2',
8 id: 'emailpass', // Yes, `emailpass`, as the goal is to override the default
9 options: {
10 // Optional configuration parameters
11 argon2: {
12 timeCost: 3,
13 memoryCost: 12288, // 12 MB
14 parallelism: 1
15 }
16 },
17 },
18 ],
19 },
20 },
21 // Other modules...
22]

🔧 Configuration Options

The plugin supports full Argon2 configuration:

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

Recommended Configuration

  • : Minimum 3, increase for more security
  • : At least 12288 KB (12 MB)
  • : 1-4 depending on your server
  • : Recommended (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

  • MedusaJS
  • Argon2 Specification

Еще в этой категории

Посмотреть все
Авторизация
Passwordless logo

Passwordless

От Devx Commerce

Добавьте беспарольный вход по SMS

Загрузка данных
GitHubnpm
Авторизация
Keycloak logo

Keycloak

От Vymalo

Подключите безопасный вход через Keycloak и контроль доступа

Загрузка данных
GitHubnpm
Авторизация
WebAuthn logo

WebAuthn

От Vymalo

Включите беспарольную аутентификацию

Загрузка данных
GitHubnpm

Еще от этого автора

Посмотреть все
Авторизация
Keycloak logo

Keycloak

От Vymalo

Подключите безопасный вход через Keycloak и контроль доступа

Загрузка данных
GitHubnpm
Уведомления
Apprise logo

Apprise

От Vymalo

Отправляйте мультиканальные уведомления в Medusa

Загрузка данных
GitHubnpm
Уведомления
Mail Templates logo

Mail Templates

От Vymalo

Создавайте шаблоны писем для Medusa

Загрузка данных
GitHubnpm