MCPcopy Index your code
hub / github.com/CapSoftware/Cap / sendVerificationRequest

Function sendVerificationRequest

packages/database/auth/auth-options.ts:103–129  ·  view source on GitHub ↗
({ identifier, token })

Source from the content-addressed store, hash-verified

101 return crypto.randomInt(100000, 1000000).toString();
102 },
103 async sendVerificationRequest({ identifier, token }) {
104 if (!serverEnv().RESEND_API_KEY) {
105 console.log("\n");
106 console.log(
107 "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━",
108 );
109 console.log("🔐 VERIFICATION CODE (Development Mode)");
110 console.log(
111 "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━",
112 );
113 console.log(`📧 Email: ${identifier}`);
114 console.log(`🔢 Code: ${token}`);
115 console.log(`⏱ Expires in: 10 minutes`);
116 console.log(
117 "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━",
118 );
119 console.log("\n");
120 } else {
121 const { OTPEmail } = await import("../emails/otp-email");
122 const email = OTPEmail({ code: token, email: identifier });
123 await sendEmail({
124 email: identifier,
125 subject: `Your Cap Verification Code`,
126 react: email,
127 });
128 }
129 },
130 }),
131 ];
132

Callers

nothing calls this directly

Calls 3

serverEnvFunction · 0.90
sendEmailFunction · 0.90
OTPEmailFunction · 0.85

Tested by

no test coverage detected