Skip to content
Migrating from NextAuth.js v4? Read our migration guide.

providers/notificationapi

The NotificationAPI provider helps you send magic links through email from Auth.js.

NotificationAPIConfig

Extends

  • Omit<EmailConfig, "sendVerificationRequest" | "options" | "apiKey" | "from">

Properties

apiKey?

optional apiKey: string;

baseURL

baseURL: string;

generateVerificationToken()?

optional generateVerificationToken: () => Awaitable<string>;
Returns

Awaitable<string>

Inherited from

Omit.generateVerificationToken

id

id: string;
Overrides

Omit.id

maxAge?

optional maxAge: number;
Inherited from

Omit.maxAge

name

name: string;
Inherited from

Omit.name

normalizeIdentifier()?

optional normalizeIdentifier: (identifier) => string;
Parameters
ParameterType
identifierstring
Returns

string

Inherited from

Omit.normalizeIdentifier

notificationId?

optional notificationId: string;

secret?

optional secret: string;

Used to hash the verification token.

Inherited from

Omit.secret

sendVerificationRequest()

sendVerificationRequest: (params) => Promise<void>;
Parameters
ParameterType
paramsParams
Returns

Promise<void>

server?

optional server: AllTransportOptions;

Used with SMTP-based email providers.

Inherited from

Omit.server

type

type: "email";
Inherited from

Omit.type


NotificationAPIUserConfig

type NotificationAPIUserConfig: {
  apiKey: string;
  baseURL: string;
  notificationId: string;
};

Setup

Configuration

NextAuth({
...
providers: [
  NotificationAPI({
    notificationId: 'auth_magic_link' // from dashboard
  })
]
...
})

Resources

Disclaimer If you think you found a bug in the default configuration, you can open an issue.

Auth.js strictly adheres to the specification and it cannot take responsibility for any deviation from the spec by the provider. You can open an issue, but if the problem is non-compliance with the spec, we might not pursue a resolution. You can ask for more help in Discussions.

Type declaration

apiKey?

optional apiKey: string;

baseURL?

optional baseURL: string;

notificationId

notificationId: string;

default()

default(config): NotificationAPIConfig

Parameters

ParameterType
configNotificationAPIUserConfig

Returns

NotificationAPIConfig

Auth.js © Balázs Orbán and Team - 2025