Notes On Migrating from Restful Authentication to Devise

Saturday 09 April 2011

I recently attempted a migration from restful_authentication to Devise. I had a bit of a struggle with making old users able to login. It mentions that pepper and stretches are not used by default. It turns out the application I was converting had both in use. I followed the instructions here first: https://github.com/plataformatec/devise/wiki/How-To:-Migrate-from-restfulauthentication-to-Devise-

This where I departed from their notes to make this work: I brought REST_AUTH_SIZE_KEY and REST_AUTH_DIGEST_STRETCHES from config/initializers/site_keys.rb over to config/initializers/devise.rb:

config/initializers/site_keys.rb (restful_authentication)

REST_AUTH_SITE_KEY = "YOUR KEY"
REST_AUTH_DIGEST_STRETCHES = 10

config/initializers/devise.rb (Devise)

config.pepper = "YOUR KEY"
config.stretches = 10

Comments

blog comments powered by Disqus