Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ysmoradi committed Jan 4, 2025
1 parent 3e4487b commit 7578e90
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
using Boilerplate.Server.Api.Models.Identity;
using Boilerplate.Shared.Controllers.Identity;
using Boilerplate.Server.Api.Services.Identity;
using Twilio.Jwt.AccessToken;

namespace Boilerplate.Server.Api.Controllers.Identity;

Expand Down Expand Up @@ -310,8 +309,8 @@ public async Task SendOtp(IdentityRequestDto request, string? returnUrl = null,
if (await userManager.IsPhoneNumberConfirmedAsync(user))
{
var token = await userManager.GenerateUserTokenAsync(user, TokenOptions.DefaultPhoneProvider, FormattableString.Invariant($"Otp_Sms,{user.OtpRequestedOn?.ToUniversalTime()}"));
var smsMessage = Localizer[nameof(AppStrings.OtpShortText), token].ToString();
smsMessage += $"{smsMessage}{Environment.NewLine}@{HttpContext.Request.GetWebAppUrl().Host} #{token}" /* Web OTP */;
var message = Localizer[nameof(AppStrings.OtpShortText), token].ToString();
var smsMessage = $"{message}{Environment.NewLine}@{HttpContext.Request.GetWebAppUrl().Host} #{token}" /* Web OTP */;
sendMessagesTasks.Add(phoneService.SendSms(smsMessage, user.PhoneNumber!, cancellationToken));
}

Expand Down

0 comments on commit 7578e90

Please sign in to comment.