added update_with_otp() method
pull request for https://github.com/tinfoil/devise-two-factor/issues/147
Imo this is application logic. If someone wants to secure certain actions with an OTP, this is already possible to do in any application. I am not convinced this has to be part of this (general) gem.
deivse has update_with_password
I guess I would have told the person that implemented that in devise the same 😄
But now that it exists, it might make sense to offer the full functionality over the API. Your changes look sensible to me.
Too bad this gem does not have a Rails app to write tests against, to proof such changes work.
Btw: if you want to make the CI pass, you could adapt the script like this: https://github.com/tinfoil/devise-two-factor/pull/155#discussion_r309428748