providers/email
EmailConfig
Shared across all ProviderType
Extends
Properties
apiKey?
optional apiKey: string;
Used with HTTP-based email providers.
from
from: string;
generateVerificationToken()?
optional generateVerificationToken: () => Awaitable<string>;
Returns
Awaitable
<string
>
id
id: string;
Uniquely identifies the provider in AuthConfig.providers It’s also part of the URL
Overrides
maxAge
maxAge: number;
name
name: string;
The provider name used on the default sign-in page’s sign-in button. For example if it’s “Google”, the corresponding button will say: “Sign in with Google”
Overrides
normalizeIdentifier()?
optional normalizeIdentifier: (identifier) => string;
Parameters
Parameter | Type |
---|---|
identifier | string |
Returns
string
options
options: EmailUserConfig;
secret?
optional secret: string;
Used to hash the verification token.
sendVerificationRequest()
sendVerificationRequest: (params) => Awaitable<void>;
Parameters
Parameter | Type |
---|---|
params | Object |
params.expires | Date |
params.identifier | string |
params.provider | EmailConfig |
params.request | Request |
params.theme | Theme |
params.token | string |
params.url | string |
Returns
Awaitable
<void
>
server?
optional server: AllTransportOptions;
Used with SMTP-based email providers.
type
type: "email";
See ProviderType
Overrides
EmailProviderType
type EmailProviderType: "email";
EmailUserConfig
type EmailUserConfig: Omit<Partial<EmailConfig>, "options" | "type">;
default()
default(config): NodemailerConfig
Parameters
Parameter | Type |
---|---|
config | NodemailerUserConfig |
Returns
Deprecated
Import this provider from the providers/nodemailer
submodule instead of providers/email
.
To log in with nodemailer, change signIn("email")
to signIn("nodemailer")