MCPcopy
hub / github.com/fosrl/pangolin / sendEmailVerificationCode

Function sendEmailVerificationCode

server/auth/sendEmailVerificationCode.ts:10–28  ·  view source on GitHub ↗
(
    email: string,
    userId: string
)

Source from the content-addressed store, hash-verified

8import { VerifyEmail } from "@server/emails/templates/VerifyEmailCode";
9
10export async function sendEmailVerificationCode(
11 email: string,
12 userId: string
13): Promise<void> {
14 const code = await generateEmailVerificationCode(userId, email);
15
16 await sendEmail(
17 VerifyEmail({
18 username: email,
19 verificationCode: code,
20 verifyLink: `${config.getRawConfig().app.dashboard_url}/auth/verify-email`
21 }),
22 {
23 to: email,
24 from: config.getNoReplyEmail(),
25 subject: "Verify your email address"
26 }
27 );
28}
29
30async function generateEmailVerificationCode(
31 userId: string,

Callers 2

signupFunction · 0.90

Calls 5

sendEmailFunction · 0.90
VerifyEmailFunction · 0.90
getRawConfigMethod · 0.80
getNoReplyEmailMethod · 0.80

Tested by

no test coverage detected