Hi, I'm trying to imaplement Reset password functionality using UmbracoIdentity. I have created a method to send email with a key to reset. When user clicks on the link it redirects him to /reset-password?resetPasswordGUID=123 where the user needs to enter email address and new password. The problem is that I cannot save the new password. I know that this is one of the limitations of UmbracoIdentity and it is not implemented, but I need this functionality. Here is my code in HandleResetPassword method:
Take a look at this thread - you may need to update the web.config. Add teh attribute allowManuallyChangingPassword="false" * in your web.config file on the* UmbracoMembershipProvider
Hi, Steve,
I already tried changing this value. The problem is that I use UmbracoIdentity (https://github.com/Shazwazza/UmbracoIdentity) not the standart UmbracoMembership.
Hi Rhys,
You gave me the idea to look all the methods in UserManager (which should be the first thing to do in the first place). I have managed to achieve reset password functionality using
Reset Password with UmbracoIdentity
Hi, I'm trying to imaplement Reset password functionality using UmbracoIdentity. I have created a method to send email with a key to reset. When user clicks on the link it redirects him to /reset-password?resetPasswordGUID=123 where the user needs to enter email address and new password. The problem is that I cannot save the new password. I know that this is one of the limitations of UmbracoIdentity and it is not implemented, but I need this functionality. Here is my code in HandleResetPassword method:
Hi Mila,
You should be able to change the User's password with the following line of code.
Hi, Rhys, I'm trying to reset password for Members and I already tried this
This doesn't work. In my example above UserManager is the manager from UmbracoIdentity.
HI Mila,
Take a look at this thread - you may need to update the web.config. Add teh attribute allowManuallyChangingPassword="false" * in your web.config file on the* UmbracoMembershipProvider
https://our.umbraco.org/forum/extending-umbraco-and-using-the-api/85722-problem-updating-members-password-using-umbraco-version-761
HTH
Steve
Hi, Steve, I already tried changing this value. The problem is that I use UmbracoIdentity (https://github.com/Shazwazza/UmbracoIdentity) not the standart UmbracoMembership.
Thanks Mila
Hi Mila,
Does the
UserManager
happen to have any methods for removing or adding a password?I'm assuming that since the
UmbracoIdentity
allows for the use of OWIN & ASP.Net Identity, there's some kind of inheritance somewhere.You could possibly remove the existing password, then add a new one, as a workaround?
I'd suspect you'd be looking for the following methods in
UserManager
.RemovePassword(userId)
.AddPassword(userId, newPassword)
Hopefully this helps.
Hi Rhys, You gave me the idea to look all the methods in UserManager (which should be the first thing to do in the first place). I have managed to achieve reset password functionality using
resetPasswordToken is generated with
Honestly I expected much more complicated solution. I cannot believe it is so simple.
Mila
Hi Mila,
I have the same problem as yours. I'm new in Umbraco and ASP.
Can I post the whole method did you use? Because I'm stuck in
RemovePassword(UserId)
Please, thanks in advance.
Jin
is working on a reply...