开发者

Migrating user records and crypted passwords from Devise to Authlogic

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜