Commit 136180d69985560ef1c8af7ced4d04895e90c31e
Remove Rails forgot password example
The forgot password feature is out of scope of this gem and not a very good example on itself. Sending plain text passwords by email is considered unsecure because SMTP, IMAP and POP and often used unencrypted.Remco van 't Veer committed on 3/31/2016, 8:35:42 AM
Parent: fbbece54c6cb8b53db01132c7eeb58955944547d
Files changed
README.md | changed |
README.md | ||
---|---|---|
@@ -75,19 +75,8 @@ | ||
75 | 75 | redirect_to home_url |
76 | 76 | end |
77 | 77 | end |
78 | 78 | |
79 | -### If a user forgets their password? | |
80 | - | |
81 | - # assign them a random one and mail it to them, asking them to change it | |
82 | - def forgot_password | |
83 | - @user = User.find_by_email(params[:email]) | |
84 | - random_password = Array.new(10).map { (65 + rand(58)).chr }.join | |
85 | - @user.password = random_password | |
86 | - @user.save! | |
87 | - Mailer.create_and_deliver_password_change(@user, random_password) | |
88 | - end | |
89 | - | |
90 | 79 | ## How to use bcrypt-ruby in general |
91 | 80 | |
92 | 81 | require 'bcrypt' |
93 | 82 |
Built with git-ssb-web