git ssb

0+

dangerousbeans / %aPBe2k3ugtjBr4rrsU1…



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.mdchanged
README.mdView
@@ -75,19 +75,8 @@
7575 redirect_to home_url
7676 end
7777 end
7878
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-
9079 ## How to use bcrypt-ruby in general
9180
9281 require 'bcrypt'
9382

Built with git-ssb-web