Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Password reset feature #508 #1343

Closed
wants to merge 22 commits into from

Conversation

atomfrede
Copy link
Member

A proposal for the long wanted password reset feature :)

  • Tested with sql/mongo on java 8
  • Java 7 should work too
  • Not sure about the cassandra version, but @jdubois you are the expert and should have a close look at it

The rest works as follows (see #508 for details):

  • User requests a password reset by proving his/her email
  • If mail exists a reset key and date are created and a mail is send to the user with reset link
  • Link is valid for 24 hours
  • Visiting the link shows a password reset form (like password change form)
  • After formular is posted the user has the new password (reset key and date are removed)

@PeterEltgroth
Copy link

Yay! Thanks for the work. I look forward to when it is merged into a release.

@jdubois
Copy link
Member

jdubois commented Apr 6, 2015

That's a huge work, thanks!!!
I might use this at Devoxx Fr this week, as we have a half day harckergarten: that could be a good exercise for everyone.
Give me some time to review everything, but indeed this should be merged!!

@atomfrede
Copy link
Member Author

Take your time, better to have a great implementation than having to create a lot patches afterwards.

@gmarziou
Copy link
Contributor

gmarziou commented Apr 9, 2015

Great feature and great work!
I'm just wondering whether there should be some mechanism to prevent too many reset requests per user.
Some malicious people could use it to spam another user.

@atomfrede
Copy link
Member Author

@gmarziou Sounds like a great idea. Will think about how to implement it.

@jdubois
Copy link
Member

jdubois commented Apr 15, 2015

@atomfrede you forgot to add the email reset template, so when the email is sent we have an error, can you add that file?
Otherwise I started merging your code in https://github.com/jhipster/generator-jhipster/tree/atomfrede-password-reset-feature -> can you have a look at it?

@atomfrede
Copy link
Member Author

@jdubois Oh sorry :( Will add it today.

ng-show="form.confirmPassword.$error.minlength" translate="global.messages.validate.confirmpassword.minlength">
Your password confirmation is required to be at least 5 characters
</p>
<p class="help-block"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could simplify markup for confirmation password by removing min and max length messages as this is already covered for password and matching both.

@atomfrede
Copy link
Member Author

@gmarziou Guess you're right, just copied the registration form in fact

@@ -5,3 +5,15 @@ angular.module('<%=angularAppName%>')
return $resource('api/account/change_password', {}, {
});
});

angular.module('jhipsterApp')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

jhipsterApp should be <%=angularAppName%>

Maybe you should consider just chaining the 3 calls to factory().

@jdubois
Copy link
Member

jdubois commented May 6, 2015

Merged with dbe65a6

@jdubois jdubois closed this May 6, 2015
@atomfrede atomfrede deleted the password-reset-feature branch May 15, 2015 17:21
@jdubois jdubois modified the milestone: Untracked PRs Oct 21, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants