Send login codes via SMTP using Mailpit-compatible transport
This commit is contained in:
@@ -8,6 +8,7 @@ import {
|
||||
maskAuthDestination,
|
||||
verifyLoginChallengeCode,
|
||||
} from './auth.js';
|
||||
import { sendLoginCodeEmail } from './mailer.js';
|
||||
import { dispatchToUserConnections, sendMessengerMessage } from './messenger.js';
|
||||
import { dateTimeScalar, jsonScalar } from './scalars.js';
|
||||
|
||||
@@ -287,7 +288,11 @@ export const resolvers = {
|
||||
});
|
||||
|
||||
const code = getStaticAuthCode();
|
||||
console.info(`[auth] login code for ${destination}: ${code}`);
|
||||
await sendLoginCodeEmail({
|
||||
to: destination,
|
||||
code,
|
||||
expiresAt: challenge.expiresAt,
|
||||
});
|
||||
|
||||
return {
|
||||
challengeToken: challenge.challengeToken,
|
||||
|
||||
Reference in New Issue
Block a user