mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-12-25 16:22:38 +03:00
fix(server): sender passed to nextauth is never used (#5938)
This commit is contained in:
parent
27f2209e87
commit
a38f7ee252
@ -172,8 +172,6 @@ export const NextAuthOptionsProvider: FactoryProvider<NextAuthOptions> = {
|
||||
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),
|
||||
})
|
||||
|
@ -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(', ')}`);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user