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, ContainerRegistrationKeys } from "@medusajs/framework/utils"2
3// ...4
5module.exports = defineConfig({6  // ...7  modules: [8    {9      resolve: "@medusajs/medusa/auth",10      dependencies: [Modules.CACHE, ContainerRegistrationKeys.LOGGER],11      options: {12        providers: [13          // other providers...14          {15            resolve: "@medusajs/medusa/auth-emailpass",16            id: "emailpass",17            options: {18              // options...19            },20          },21        ],22      },23    },24  ],25})

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
Ask Anything
FAQ
What is Medusa?
How can I create a module?
How can I create a data model?
How do I create a workflow?
How can I extend a data model in the Product Module?
Recipes
How do I build a marketplace with Medusa?
How do I build digital products with Medusa?
How do I build subscription-based purchases with Medusa?
What other recipes are available in the Medusa documentation?
Chat is cleared on refresh
Line break