two_factor_authentication icon indicating copy to clipboard operation
two_factor_authentication copied to clipboard

User is directly getting access to site without asking for code

Open DhanashreeDorage opened this issue 7 years ago • 4 comments

I am using rails 5.2 and two_factor_authentication 2.1.1. I am following exact steps mentioned in https://github.com/Houdini/two_factor_authentication/blob/master/README.md and https://www.rubydoc.info/gems/two_factor_authentication/1.1.5. When user signs in it get direct access to site without asking for code. It worked once and all of a sudden stopped working.

DhanashreeDorage avatar Jul 12 '18 19:07 DhanashreeDorage

I am having the same issue here, it worked in the first time but never again

IsaacOliveira avatar Jul 13 '18 16:07 IsaacOliveira

Currently its working for me I added create_direct_otp method to my user model and made this true config.delete_cookie_on_logout = true in devise.rb file.

But if you just make config.delete_cookie_on_logout = false this true and don't add create method to user model it does not work.

DhanashreeDorage avatar Jul 13 '18 17:07 DhanashreeDorage

The config.delete_cookie_on_logout = true was enough for me, thanks for the help, it's working now

IsaacOliveira avatar Jul 17 '18 13:07 IsaacOliveira

+1 config.delete_cookie_on_logout = true -- That's all you need to do.

mindtonic avatar Nov 27 '18 15:11 mindtonic