-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Mandatory OTP Issue #78
Conversation
…rcement throughout application;
…ensure that Devise mappings are populated before calling define_helpers;
…regenerate_helpers! method;
…pers! method; move DeviseOtpAuthenticable module above Devise module modifications to ensure that PublicHelpers class is available; append "on_load" callback to devise-otp file to ensure that updated helpers are included;
I too was thinking of moving it outside the session controller, looks good as an approach. |
OK, good. The meta programming was the tricky part for me: the Mappings have to be defined before calling the "define_helpers" method in order to generate the per-mapping routes. Here are the approaches I considered (for reference):
I don't know if you know of a better way, but the first seemed the least intrusive to me. |
@strzibny, here is the completed mandatory_otp solution. It resolves the main issue where mandatory otp can be skipped in Issue #71. Please let me know your thoughts!
(Excerpted from CHANGELOG)
Summary: Move mandatory OTP functionality to the helper layer to ensure that it is enforced throughout application (rather than one time at log in).
Details:
Breaking Changes: