Emailpass Auth Module Provider

In this document, you’ll learn about the Emailpass auth module provider and how to install and use it in the Auth Module.

Using the Emailpass auth module provider, you allow users to register and login with an email and password.


Register the Emailpass Auth Module Provider#

The Emailpass auth provider is registered by default with the Auth Module.

If you want to pass options to the provider, add the provider to the providers option of the Auth Module:

medusa-config.ts
1import { Modules } from "@medusajs/framework/utils"2
3// ...4
5const modules = {6  // ...7  [Modules.AUTH]: {8    resolve: "@medusajs/medusa/auth",9    options: {10      providers: [11        // other providers...12        {13          resolve: "@medusajs/medusa/auth-emailpass",14          id: "emailpass",15          options: {16            // options...17          },18        },19      ],20    },21  },22}

Module Options#

ConfigurationDescriptionRequiredDefault

hashConfig

An object of configurations to use when hashing the user's password. Refer to scrypt-kdf's documentation for accepted options.

No

const hashConfig = {
  logN: 15,
  r: 8,
  p: 1
}

Was this page helpful?
Edit this page