feat: integrate Resend for OTP email delivery and update configuration
This commit is contained in:
@@ -328,12 +328,12 @@ Json::Value AuthService::requestOtp(const Json::Value &body)
|
||||
email::EmailService mail;
|
||||
if (!mail.sendOtp(user[0]["email"].as<std::string>(), code))
|
||||
{
|
||||
LOG_WARN << "Could not send OTP email through Mailpit";
|
||||
LOG_WARN << "Could not queue OTP email through " << mail.deliveryName();
|
||||
return failure("otp_email_failed");
|
||||
}
|
||||
|
||||
auto response = success();
|
||||
response["delivery"] = "mailpit";
|
||||
response["delivery"] = mail.deliveryName();
|
||||
response["expires_in_minutes"] = otpTtlMinutes();
|
||||
return response;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user