-
Notifications
You must be signed in to change notification settings - Fork 46
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
Native Warden Authentication #77
Conversation
…tications directly to OTP Credentials controller rather than logging in; delete Sessions hook with overwritten logout/login "create_session" method (no longer needed);
…move challenge, recovery, and resource variables to filters for easier reference; unnest "challenge" and "recovery" fields in form params for consistency between show and update actions;
… blank challenges (resolves "undefined method root_url" error);
…in_at when present; - Break apart needs_credential_refresh? method, and set return URL within otp_tokens controller for simplicity; - Remove 'refresh_otp_credentials_for(resource)' from create_otp_session method (no longer needed);
… for refreshing this on sign_in (similar to Trackable);
@strzibny, what would you think about adding a dedicated require_mandatory_otp! helper, similar to the "authenticate_{scope}!" helpers, for forcing redirection to the edit_otp_token path for mandatory otp? This approach would necessitate you adding that helper to your application controller (or whichever you use as the base for that portion of your app), alongside of authenticate_user!
We would just need to note in the README that you need to add this to whatever scope you want to require mandatory_otp for. |
Closing PR. Will open a new PR with a simpler solution. |
This PR updates the "database_authenticatable" warden strategy to redirect to OTP challenge if OTP is enabled. Benefits include:
Outstanding issues: