I use OmniAuth and Devise to authenticate users. I would like for users who signed up with OmniAuth providers to be able to set an optional password (required for API authentication), but I ran into a wall.
If a user creates an account through OmniAuth and tries to set a password, she receives the following error:
BCrypt::Errors::InvalidHash in RegistrationsController
I believe this is because the password is empty. What a good way to get around this? I was thinking of generating a random password, but the problem with this approach is that the user needs to know the current password in order to edit the settings.
Edit : I looked at letting the user change the settings without having to use the current password and what I would like to do only if the user did not have a password at first.
David source
share