ekyc

Electronic KYC process with uploading ID document using OAuth 2.1 (experimental)
Log | Files | Refs | README | LICENSE

mailer.ts (569B)


      1 import { AuthEmailChallengeMailer } from "../../core/application/authn/email_challenge.ts";
      2 
      3 export class FakeAuthEmailChallengeMailerAdapter
      4   implements AuthEmailChallengeMailer {
      5   public lastEmail: string | null = null;
      6   public lastCode: string | null = null;
      7 
      8   send(email: string, code: string): void | Promise<void> {
      9     this.lastEmail = email;
     10     this.lastCode = code;
     11     console.log("AUTH EMAIL CHALLENGE", email, code);
     12   }
     13 }
     14 
     15 export function createFakeMailer() {
     16   return {
     17     authEmailChallengeMailer: new FakeAuthEmailChallengeMailerAdapter(),
     18   };
     19 }