Hi there,
In GitHub I see this recent change:
https://github.com/dynamicweb/Swift/blob/main/Swift/Files/Templates/Designs/Swift/UserManagement/Login/RecoveryEmail.cshtml#L10-L11
which adds the full scheme and domain to the URL in the password reset template. Yet in the code for the module I see this:
private void SendPasswordRecoveryLink(User user, int linkLifeTime)
{
string token = Guid.NewGuid().ToString();
user.PasswordRecoveryToken = token;
user.PasswordRecoveryTokenExpirationTime = DateTime.UtcNow.AddHours(linkLifeTime);
user.Save();
string url = $"{Context.Current.Request.Url.Scheme}://{Context.Current.Request.Url.Host}/Default.aspx?ID={Context.Current.Request.QueryString["ID"]}&RecoveryToken={user.PasswordRecoveryToken}";
Dictionary<string, string> tagsValues = new Dictionary<string, string>
{
{ "DWPasswordRecoveryUrl", url },
{ "DWPasswordRecoveryToken", token },
{ "DWPasswordRecoveryMethod", PasswordRecoveryMethod.SendRestoreLink.ToString() }
};
You would think that would add the domain twice, no? But at the same time, it seems that we don't get the URL in the template if I simply use GetString("DWPasswordRecoveryUrl") (although I have also cases where it does work)
What am I missing? Did this get changed in the core product recently?
Imar