(
id: string,
name: string,
user: User,
)
| 5 | |
| 6 | export 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, |
nothing calls this directly
no test coverage detected