MCPcopy Create free account
hub / github.com/bewcloud/bewcloud / createAndSendCode

Method createAndSendCode

lib/models/multi-factor-auth/email.ts:28–35  ·  view source on GitHub ↗
(
    id: string,
    user: User,
  )

Source from the content-addressed store, hash-verified

26 }
27
28 static async createAndSendCode(
29 id: string,
30 user: User,
31 ): Promise<void> {
32 const code = await VerificationCodeModel.create(user, `${user.email}-${id}`, 'email');
33
34 await EmailTransportModel.sendLoginVerificationEmail(user.email, code);
35 }
36
37 static async verifyCode(
38 methodId: string,

Callers 2

createMethodMethod · 0.95
createSessionResponseMethod · 0.80

Calls 2

createMethod · 0.45

Tested by

no test coverage detected