@authcore/nodemailer-adapter
v0.5.4
Published
Nodemailer email adapter for AuthCore
Maintainers
Readme
@authcore/nodemailer-adapter
Nodemailer email adapter for AuthCore.
Install
npm install @authcore/nodemailer-adapter nodemailerUsage
import { nodemailerAdapter } from '@authcore/nodemailer-adapter'
import { createAuth } from '@authcore/express'
const auth = createAuth({
db: prismaAdapter(prisma),
session: { strategy: 'jwt', secret: process.env.AUTH_SECRET! },
email: {
provider: nodemailerAdapter({
host: 'smtp.example.com',
port: 587,
auth: { user: 'user', pass: 'pass' },
}),
from: '[email protected]',
},
features: ['emailVerification', 'passwordReset'],
})API
nodemailerAdapter(config): EmailAdapter
nodemailerAdapter({
host: string,
port: number,
secure?: boolean, // default: false
auth?: {
user: string,
pass: string,
},
})Creates an EmailAdapter that sends emails via SMTP using Nodemailer.
