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

Method createMethod

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

Source from the content-addressed store, hash-verified

5
6export class EmailModel {
7 static async createMethod(
8 id: string,
9 name: string,
10 user: User,
11 ): Promise<MultiFactorAuthSetup> {
12 const method: MultiFactorAuthMethod = {
13 type: 'email',
14 id,
15 name,
16 enabled: false,
17 created_at: new Date(),
18 metadata: {},
19 };
20
21 await this.createAndSendCode(id, user);
22
23 return {
24 method,
25 };
26 }
27
28 static async createAndSendCode(
29 id: string,

Callers

nothing calls this directly

Calls 1

createAndSendCodeMethod · 0.95

Tested by

no test coverage detected