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

Function hashEmailCode

apps/web/app/api/mobile/[...route]/route.ts:97–101  ·  view source on GitHub ↗
(code: string)

Source from the content-addressed store, hash-verified

95};
96
97const hashEmailCode = (code: string) =>
98 crypto
99 .createHash("sha256")
100 .update(`${code}${serverEnv().NEXTAUTH_SECRET}`)
101 .digest("hex");
102
103const sendMobileEmailCode = async (email: string, code: string) => {
104 if (!serverEnv().RESEND_API_KEY) {

Callers 1

route.tsFile · 0.85

Calls 2

serverEnvFunction · 0.90
updateMethod · 0.80

Tested by

no test coverage detected