diff --git a/api/src/modules/auth/commands/request-password-recovery.handler.ts b/api/src/modules/auth/commands/request-password-recovery.handler.ts index 7291f650..cd797b8d 100644 --- a/api/src/modules/auth/commands/request-password-recovery.handler.ts +++ b/api/src/modules/auth/commands/request-password-recovery.handler.ts @@ -16,7 +16,7 @@ export class RequestPasswordRecoveryHandler ) {} async execute(command: RequestPasswordRecoveryCommand): Promise { - const { email } = command; + const { email, origin } = command; const user = await this.users.findByEmail(email); if (!user) { this.eventBus.publish(new PasswordRecoveryRequestedEvent(email, null)); @@ -24,8 +24,7 @@ export class RequestPasswordRecoveryHandler } await this.authMailer.sendPasswordRecoveryEmail({ user, - // TODO: Origin must come from env vars - origin: 'http://localhost:3000', + origin, }); this.eventBus.publish(new PasswordRecoveryRequestedEvent(email, user.id)); }