diff --git a/Yavsc/Auth/UserTokenProvider.cs b/Yavsc/Auth/UserTokenProvider.cs index 3203fc2e..3eb08763 100644 --- a/Yavsc/Auth/UserTokenProvider.cs +++ b/Yavsc/Auth/UserTokenProvider.cs @@ -9,6 +9,10 @@ namespace Yavsc.Auth { public class UserTokenProvider : Microsoft.AspNet.Identity.IUserTokenProvider { + private MonoDataProtector protector=null; + public MonoDataProtector Protector { + get { return protector; } + } public Task CanGenerateTwoFactorTokenAsync(UserManager manager, ApplicationUser user) { @@ -27,12 +31,13 @@ namespace Yavsc.Auth { { var por = new MonoDataProtector(Constants.ApplicationName,new string[] { purpose } ); var userStamp = por.Unprotect(token); - string [] values = userStamp.Split(' '); + Console.WriteLine ("Unprotected: "+userStamp); + string [] values = userStamp.Split(';'); return Task.FromResult ( user.Id == values[0] && user.Email == values[1] && user.UserName == values[2]); } public static string UserStamp(ApplicationUser user) { - return $"{user.Id} {user.Email} {user.UserName}"; + return $"{user.Id};{user.Email};{user.UserName}"; } } } \ No newline at end of file diff --git a/Yavsc/Controllers/AccountController.cs b/Yavsc/Controllers/AccountController.cs index 8b73bbd1..0152780c 100644 --- a/Yavsc/Controllers/AccountController.cs +++ b/Yavsc/Controllers/AccountController.cs @@ -42,7 +42,7 @@ namespace Yavsc.Controllers IOptions siteSettings, IOptions smtpSettings, ILoggerFactory loggerFactory, IOptions twilioSettings, - IStringLocalizer localizer) + IStringLocalizer localizer) { _userManager = userManager; _signInManager = signInManager; @@ -356,7 +356,7 @@ namespace Yavsc.Controllers var code = await _userManager.GeneratePasswordResetTokenAsync(user); var callbackUrl = Url.Action("ResetPassword", "Account", new { userId = user.Id, code = code }, protocol: HttpContext.Request.Scheme); await _emailSender.SendEmailAsync(_siteSettings,_smtpSettings,model.Email, _localizer["Reset Password"], - _localizer["Please reset your password by followin this link:"] + callbackUrl ); + _localizer["Please reset your password by following this link:"] + callbackUrl ); return View("ForgotPasswordConfirmation"); } diff --git a/Yavsc/Resources/Yavsc.Resources.YavscLocalisation.fr.resx b/Yavsc/Resources/Yavsc.Resources.YavscLocalisation.fr.resx index c3f46a15..5254b319 100644 --- a/Yavsc/Resources/Yavsc.Resources.YavscLocalisation.fr.resx +++ b/Yavsc/Resources/Yavsc.Resources.YavscLocalisation.fr.resx @@ -162,6 +162,8 @@ Chiffre Cercles Action sur click + Cliquez ici pour vous identifier + Commentaire Consultant Contactez un préstataire @@ -274,6 +276,7 @@ Personne Photo Photo mise à jour + S'il vous plait S'il vous plait, veuillez verifier votre boite au lettres, pour pouvoir ré-initialiser votre mot de passe. S'il vous plait, veuillez confirmer votre nouveau mot de passe. S'il vous plait, saisissez un corps de message @@ -301,6 +304,7 @@ Supprimer mon profile professionnel Rôle Ré-initialiser votre mot de passe + Confirmation de ré-initialiser du mot de passe Rôle créé Nom du rôle Save these settings @@ -352,6 +356,8 @@ à un préstataire. Vous n'êtes pas administrateur Votre demande de rendez-vous + Votre mote de passe a été mis à jour. + Vos Devis Votre activité Votre besoin diff --git a/Yavsc/Views/Account/ResetPasswordConfirmation.cshtml b/Yavsc/Views/Account/ResetPasswordConfirmation.cshtml index e938a208..ac232439 100755 --- a/Yavsc/Views/Account/ResetPasswordConfirmation.cshtml +++ b/Yavsc/Views/Account/ResetPasswordConfirmation.cshtml @@ -1,8 +1,8 @@ @{ - ViewData["Title"] = "Reset password confirmation"; + ViewData["Title"] = SR["Reset password confirmation"]; }

@ViewData["Title"].

- Your password has been reset. Please Click here to log in. + @SR["Your password has been reset."] @SR["Please"] @SR["Click here to log in"].