twilio / authy-devise

Authy Devise plugin to add Two-Factor Authentication
MIT License
201 stars 84 forks source link

Add remember_device for OneTouch Login #128

Closed ruralopez closed 4 years ago

ruralopez commented 4 years ago

Currently, there is no possibility of remember device when login process is through OneTouch. This fix takes the same checkbox used in submit-token form and retrieves checked state on every onetouchInterval execution, so every onetouchRequest sends the variable as a query string to the server (like onetouch_uuid). Then, GET_authy_onetouch_status method in devise_authy_controller.rb validates remember_device param and replicates remember_device helper in 'approved' case.

Fixes #127

Contributing to Twilio

All third-party contributors acknowledge that any contributions they provide will be made under the same open-source license that the open-source project is provided under.

philnash commented 4 years ago

Thanks very much @cplopez4, this looks great and I don't know why it wasn't already there. Thank you for your contribution.