www/apps/resources/app/commerce-modules/auth/auth-providers/emailpass/page.mdx
import { Table } from "docs-ui"
export const metadata = {
title: Emailpass Auth Module Provider,
}
In this guide, you’ll learn about the Emailpass Auth Module Provider and how to configure it.
By using the Emailpass Auth Module Provider, you allow users to register and log in with an email and password.
The Emailpass Auth Module 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 in your medusa-config.ts:
import { Modules, ContainerRegistrationKeys } from "@medusajs/framework/utils"
// ...
module.exports = defineConfig({
// ...
modules: [
{
resolve: "@medusajs/medusa/auth",
dependencies: [Modules.CACHE, ContainerRegistrationKeys.LOGGER],
options: {
mfa: {
encryption_key: process.env.AUTH_MFA_ENCRYPTION_KEY,
},
providers: [
// other providers...
{
resolve: "@medusajs/medusa/auth-emailpass",
id: "emailpass",
options: {
// options...
},
},
],
},
},
],
})
`hashConfig`
</Table.Cell>
<Table.Cell>
An object of configurations for hashing the user's
password. Refer to [scrypt-kdf](https://www.npmjs.com/package/scrypt-kdf#-hash)'s
documentation for accepted options.
</Table.Cell>
<Table.Cell>
No
</Table.Cell>
<Table.Cell>
```ts blockStyle="inline"
const hashConfig = {
logN: 15,
r: 8,
p: 1
}
```
</Table.Cell>
</Table.Row>
<Table.Row>
<Table.Cell>
`require_verification` (v2.15.5+)
</Table.Cell>
<Table.Cell>
Whether to require email verification for new registrations
and authentications. When enabled, users must verify their
email address before they can authenticate successfully.
</Table.Cell>
<Table.Cell>
No
</Table.Cell>
<Table.Cell>
`false`
</Table.Cell>
</Table.Row>
</Table.Body>
</Table>