Fixes the request scheme, that's https.
This commit is contained in:
@ -236,7 +236,7 @@ namespace Yavsc.Controllers
|
||||
// For more information on how to enable account confirmation and password reset please visit http://go.microsoft.com/fwlink/?LinkID=532713
|
||||
// Send an email with this link
|
||||
var code = await _userManager.GenerateEmailConfirmationTokenAsync(user);
|
||||
var callbackUrl = Url.Action("ConfirmEmail", "Account", new { userId = user.Id, code = code }, protocol: HttpContext.Request.Scheme);
|
||||
var callbackUrl = Url.Action("ConfirmEmail", "Account", new { userId = user.Id, code = code }, protocol: "https");
|
||||
var emailSent = await _emailSender.SendEmailAsync(model.UserName, model.Email, _localizer["ConfirmYourAccountTitle"],
|
||||
string.Format(_localizer["ConfirmYourAccountBody"], _siteSettings.Title, callbackUrl, _siteSettings.Slogan, _siteSettings.Audience));
|
||||
// No, wait for more than a login pass submission:
|
||||
@ -276,7 +276,7 @@ namespace Yavsc.Controllers
|
||||
{
|
||||
var code = await _userManager.GenerateEmailConfirmationTokenAsync(user);
|
||||
var callbackUrl = Url.Action("ConfirmEmail", "Account",
|
||||
new { userId = user.Id, code = code }, protocol: HttpContext.Request.Scheme);
|
||||
new { userId = user.Id, code = code }, protocol: "https");
|
||||
var res = await _emailSender.SendEmailAsync(user.UserName, user.Email,
|
||||
this._localizer["ConfirmYourAccountTitle"],
|
||||
string.Format(this._localizer["ConfirmYourAccountBody"],
|
||||
@ -471,7 +471,7 @@ namespace Yavsc.Controllers
|
||||
// For more information on how to enable account confirmation and password reset please visit http://go.microsoft.com/fwlink/?LinkID=532713
|
||||
// Send an email with this link
|
||||
var code = await _userManager.GeneratePasswordResetTokenAsync(user);
|
||||
var callbackUrl = Url.Action("ResetPassword", "Account", new { userId = user.Id, code = code }, protocol: HttpContext.Request.Scheme);
|
||||
var callbackUrl = Url.Action("ResetPassword", "Account", new { userId = user.Id, code = code }, protocol: "https");
|
||||
await _emailSender.SendEmailAsync(user.UserName, user.Email, _localizer["Reset Password"],
|
||||
_localizer["Please reset your password by following this link:"] + " <" + callbackUrl + ">");
|
||||
return View("ForgotPasswordConfirmation");
|
||||
|
@ -37,7 +37,7 @@
|
||||
<form asp-controller="Account" asp-action="LogOff"
|
||||
method="post" id="logoutForm">
|
||||
<button type="submit" class="btn navbar-btn" >@SR["Logout"]</button>
|
||||
<input type="hidden" name="ReturnUrl" value="@Url.Action()" />
|
||||
<input type="hidden" name="ReturnUrl" value="/" />
|
||||
</form>
|
||||
</li>
|
||||
</ul>
|
||||
|
Reference in New Issue
Block a user