diff --git a/src/Yavsc/Controllers/Accounting/AccountController.cs b/src/Yavsc/Controllers/Accounting/AccountController.cs index e5c57a01..02d26a50 100644 --- a/src/Yavsc/Controllers/Accounting/AccountController.cs +++ b/src/Yavsc/Controllers/Accounting/AccountController.cs @@ -197,7 +197,7 @@ namespace Yavsc.Controllers return HttpBadRequest(); } // Note: this still is not the redirect uri given to the third party provider, at building the challenge. - var redirectUrl = Url.Action("ExternalLoginCallback", "Account", new { ReturnUrl = model.ReturnUrl }); + var redirectUrl = Url.Action("ExternalLoginCallback", "Account", new { ReturnUrl = model.ReturnUrl }, protocol:"https" , host: Startup.Authority); var properties = _signInManager.ConfigureExternalAuthenticationProperties(model.Provider, redirectUrl); // var properties = new AuthenticationProperties{RedirectUri=ReturnUrl}; return new ChallengeResult(model.Provider, properties); @@ -238,7 +238,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: "https"); + var callbackUrl = Url.Action("ConfirmEmail", "Account", new { userId = user.Id, code = code }, protocol: "https", host: Startup.Authority); 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: @@ -293,7 +293,7 @@ namespace Yavsc.Controllers { var code = await _userManager.GenerateEmailConfirmationTokenAsync(user); var callbackUrl = Url.Action("ConfirmEmail", "Account", - new { userId = user.Id, code = code }, protocol: "https"); + new { userId = user.Id, code = code }, protocol: "https", host: Startup.Authority); var res = await _emailSender.SendEmailAsync(user.UserName, user.Email, this._localizer["ConfirmYourAccountTitle"], string.Format(this._localizer["ConfirmYourAccountBody"],