Isnor Creative
Isnor Creative Blog
Ruby, Ruby on Rails, Ember, Elm, Phoenix, Elixir, React, Vue

Apr 9, 2011

Notes On Migrating from Restful Authentication to Devise

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


I am available for Ruby on Rails consulting work – get in touch to learn more.

Gordon B. Isnor

Gordon B. Isnor writes about Ruby on Rails, Ember.js, Elm, Elixir, Phoenix, React, Vue and the web.
If you enjoyed this article, you may be interested in the occasional newsletter.

I am now available for project work. I have availability to build greenfield sites and applications, to maintain and update/upgrade existing applications, team augmentation. I offer website/web application assessment packages that can help with SEO/security/performance/accessibility and best practices. Let’s talk

comments powered by Disqus