devise icon indicating copy to clipboard operation
devise copied to clipboard

strong_password gem prevents login

Open LimeBlast opened this issue 4 years ago • 0 comments

Pre-check

  • Do not use the issues tracker for help or support, try Stack Overflow.
  • For bugs, do a quick search and make sure the bug has not yet been reported
  • If you found a security bug, do not report it through GitHub. Please send an e-mail to [email protected] instead.
  • Finally, be nice and have fun!

Environment

  • Ruby 2.6.8
  • Rails 5.2.6
  • Devise 4.8.0

Current behavior

Installed the strong_password gem on an existing project, with the changes to user.rb and devise.rb below.

# user.rb snippet

  validates :password, password_strength: {
    use_dictionary: true,
    extra_dictionary_words: :my_extra_words
  }

  def my_extra_words
    [name, email]
  end

# devise.rb snippet

  config.password_length = 12..128

Logging in with an existing user shows the following error

Markup on 2021-11-15 at 1:24:58 pm

Expected behavior

To be able to login without issue.

LimeBlast avatar Nov 15 '21 13:11 LimeBlast

Can you post the full trace? It looks like something in the login process is saving the user and triggers the validation.

mvz avatar Aug 19 '22 18:08 mvz

Hi, thanks for your reply. I don't recall what this was for, and I've got a feeling it isn't an issue anymore, so I'm just going to close the issue. I'll re-open and post the full trace if it comes back again.

LimeBlast avatar Aug 22 '22 08:08 LimeBlast