diff --git a/packages/backend/server/src/core/auth/next-auth-options.ts b/packages/backend/server/src/core/auth/next-auth-options.ts index a134363bb6..e7eac7ff56 100644 --- a/packages/backend/server/src/core/auth/next-auth-options.ts +++ b/packages/backend/server/src/core/auth/next-auth-options.ts @@ -174,8 +174,6 @@ export const NextAuthOptionsProvider: FactoryProvider = { nextAuthOptions.providers.push( // @ts-expect-error esm interop issue Email.default({ - server: config.mailer, - from: config.mailer.from, sendVerificationRequest: (params: SendVerificationRequestParams) => sendVerificationRequest(config, logger, mailer, session, params), }) diff --git a/packages/backend/server/src/core/auth/utils/send-mail.ts b/packages/backend/server/src/core/auth/utils/send-mail.ts index 9cc349bd53..fdc463d90c 100644 --- a/packages/backend/server/src/core/auth/utils/send-mail.ts +++ b/packages/backend/server/src/core/auth/utils/send-mail.ts @@ -11,7 +11,7 @@ export async function sendVerificationRequest( session: SessionService, params: SendVerificationRequestParams ) { - const { identifier, url, provider } = params; + const { identifier, url } = params; const urlWithToken = new URL(url); const callbackUrl = urlWithToken.searchParams.get('callbackUrl') || ''; if (!callbackUrl) { @@ -28,7 +28,6 @@ export async function sendVerificationRequest( const result = await mailer.sendSignInEmail(urlWithToken.toString(), { to: identifier, - from: provider.from, }); logger.log(`send verification email success: ${result.accepted.join(', ')}`);