MCPcopy
hub / github.com/CapSoftware/Cap / sendMobileEmailCode

Function sendMobileEmailCode

apps/web/app/api/mobile/[...route]/route.ts:103–122  ·  view source on GitHub ↗
(email: string, code: string)

Source from the content-addressed store, hash-verified

101 .digest("hex");
102
103const sendMobileEmailCode = async (email: string, code: string) => {
104 if (!serverEnv().RESEND_API_KEY) {
105 if (process.env.NODE_ENV === "production") {
106 throw new Error("RESEND_API_KEY is required to send mobile email codes");
107 }
108 console.log("");
109 console.log("Cap mobile verification code");
110 console.log(`Email: ${email}`);
111 console.log(`Code: ${code}`);
112 console.log("Expires in: 10 minutes");
113 console.log("");
114 return;
115 }
116
117 await sendEmail({
118 email,
119 subject: "Your Cap Verification Code",
120 react: OTPEmail({ code, email }),
121 });
122};
123
124const getMobileRedirectUrl = (redirectUri: string) => {
125 try {

Callers 1

route.tsFile · 0.85

Calls 3

serverEnvFunction · 0.90
sendEmailFunction · 0.90
OTPEmailFunction · 0.90

Tested by

no test coverage detected