We were unable to load Disqus. If you are a moderator please see our troubleshooting guide.
@andy Yeah I looked at their code and it seems so. But I can't find the demo you talked about, is there a link to it?
the demo app is in a different repo here: https://github.com/Houdini/.... i'm working on a project and am currently in the same situation as figuring out how to implement the two-step aspect of authentication. would Warden.after_authentication achieve the same effect as yours results in this post?
Can someone please help me out.
I am getting this error:
ActionView::Template::Error (undefined method `otp_attempt' for #<clientaccount:0x00007efc90d21b38>)
It appears that the parameter otp_attempt isn't attached to your model. Without replicable code sample it is difficult to tell exactly what's wrong but I suspect you haven't extended your model with a `devise :two_factor_authenticatable` and the like.
Does this still work in Rails 6? This is one of the only two factor auth tutorials for rails without having to pay a subscription for a third party.
Sorry it has been years since I stopped developing in Rails. By looking at the commit log it appears Rails 6 is supported https://github.com/tinfoil/...
I've tried a lot of examples for two-factor-authentication in Rails, but this is the only I get actually work!
With this starting point it's easier to adjust it to your own needs, like sending the code through sms.
Thanks!
The Houdini/two_factor_authentication gem, which you link to, does this out of the box. The demo app has two form steps. They do this by hooking into Warden.after_authenticate and setting a session variable to block future page loads until 2fa is successful