I’m thinking of moving over to Omniauth 1.0 (using the “identity” strategy or gem) from Devise 1.4.7, my question is after doing all the code conversion, views etc, will the old passwords, those user accounts created with Devise, still work with the same passwords under OmniAuth?
I’ve done some research and both are using bcrypt, so I’m guessing “yes” they will work as before and users won’t have to create new passwords. Or am I missing something crucial?
Devise passwords are not directly compatible with omniauth-identity
It is true that they both use bcrypt to hash the password, however Devise adds a “pepper” to the password. You would have to add code to omniauth-identity to support a “pepper”.
Pepper your passwords
Devise adds a pepper to your passwords (since it is already salted by bcrypt), so in order for you to migrate devise users to omniauth-identity, you have to teach the identity strategy how to pepper passwords. This snippit works for us, however we didn’t change the :stretches configuration option in devise.
How we made it work
This is a very quick and dirty monkey patch we used to make it work. We are investigating how to add this functionality in a more appropriate manner.