diff --git a/SS14.Auth.Shared/ModelShared.cs b/SS14.Auth.Shared/ModelShared.cs index b85bf6b..155367e 100644 --- a/SS14.Auth.Shared/ModelShared.cs +++ b/SS14.Auth.Shared/ModelShared.cs @@ -11,7 +11,8 @@ public static class ModelShared public static async Task SendConfirmEmail(IEmailSender sender, string address, string confirmLink) { await sender.SendEmailAsync(address, "Confirm your Space Station 14 account", - $"Please confirm your account by clicking here."); + $"Please confirm your account by clicking here." + + $"\n
If the above link is not working, try this one {HtmlEncoder.Default.Encode(confirmLink)}
"); } public static async Task SendResetEmail(IEmailSender emailSender, string email, string callbackUrl) @@ -19,12 +20,13 @@ public static async Task SendResetEmail(IEmailSender emailSender, string email, await emailSender.SendEmailAsync( email, "Reset Password", "A password reset has been requested for your account.If the above link is not working, try this one {HtmlEncoder.Default.Encode(callbackUrl)}
OnPostConfirmationAsync(string returnUrl = null values: new { area = "Identity", userId = userId, code = code }, protocol: Request.Scheme); - await _emailSender.SendEmailAsync(Input.Email, "Confirm your email", - $"Please confirm your account by clicking here."); + await ModelShared.SendConfirmEmail(_emailSender, Input.Email, callbackUrl); // If account confirmation is required, we need to show the link if we don't have a real email sender if (_userManager.Options.SignIn.RequireConfirmedAccount) @@ -163,4 +162,4 @@ await _emailSender.SendEmailAsync(Input.Email, "Confirm your email", ReturnUrl = returnUrl; return Page(); } -} \ No newline at end of file +} diff --git a/SS14.Web/Areas/Identity/Pages/Account/Manage/Email.cshtml.cs b/SS14.Web/Areas/Identity/Pages/Account/Manage/Email.cshtml.cs index 15349d5..6ebc87d 100644 --- a/SS14.Web/Areas/Identity/Pages/Account/Manage/Email.cshtml.cs +++ b/SS14.Web/Areas/Identity/Pages/Account/Manage/Email.cshtml.cs @@ -6,6 +6,7 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.RazorPages; using Microsoft.AspNetCore.WebUtilities; +using SS14.Auth.Shared; using SS14.Auth.Shared.Data; using SS14.Auth.Shared.Emails; @@ -100,10 +101,7 @@ public async Task