spree / spree_auth_devise

Provides authentication (user accounts, login & signup) for @spree by using Devise
https://spreecommerce.org
BSD 3-Clause "New" or "Revised" License
139 stars 493 forks source link

Set devise stretches to default 10 #567

Open dylanfisher opened 2 years ago

dylanfisher commented 2 years ago

I was running into a problem where logging in with a Spree user created after installing this gem was taking around 120 seconds to login in development. I think this was because the devise stretches was set to 20. See this thread for more context https://github.com/heartcombo/devise/issues/1184#issuecomment-1492985.

Perhaps when this initializer was set up originally a different encryption strategy was being used and the higher stretches wasn't as slow.

To get around the issue while using this gem, just override the stretches config in a config/devise.rb initializer in the host app.