Skip to content

Conversation

@jmschneider
Copy link

If there is a validation error on the user model, it can lead to some unpredictable 2FA behavior. For example, the send_new_otp method will send a new OTP code to the user even if it failed to update the direct_otp column in the database. When this happens, the new code does not work for the user.

Looking at other devise modules, they tend to skip validations when saving data as well:

It seems like generating the direct_otp token is similar to a lot of these other cases where validation is skipped.

This should also fix #170

@jmschneider jmschneider reopened this Oct 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rails 6.1 deprecation warning

1 participant