开发者

Migrating user records and crypted passwords from Devise to Authlogic

开发者 https://www.devze.com 2023-03-05 17:41 出处:网络
Does anyone have any experience migrating from Devise to Authlogic, specif开发者_开发知识库ically when it comes to dealing with the crypted password? I currently use bcrypt in Devise and will also use

Does anyone have any experience migrating from Devise to Authlogic, specif开发者_开发知识库ically when it comes to dealing with the crypted password? I currently use bcrypt in Devise and will also use bcrypt in Authlogic.


This should be easy. I'm assuming you know the fields Authlogic requires. One of them is the password_salt. Make sure that the salt Devise uses is put into the password_salt field.

At the top of your user model, add the following:

acts_as_authentic do |config|
  config.crypto_provider = Authlogic::CryptoProviders::BCrypt 
end

Also, I'm assuming you already have the BCrypt gem in your gemfile.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号