twilio / authy-devise

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

Stop calling signed_in? before needed. #126

Closed philnash closed 4 years ago

philnash commented 4 years ago

check_request_and_redirect_to_verify_token is guarded by is_signing_in? but both of them make calls to signed_in? which in turn calls warden.authenticate? which actually signs a user in if the right details are in the request. check_request_and_redirect_to_verify_token actually calls signed_in? and means to, so it is not necessary to call signed_in?1, particularly so early in the guard which is run on every controller action, inis_signing_in?`.

Fixes #76.

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.