Replies: 1 comment 2 replies
-
If you can reuse the logic easily, it seems better to modify the code so there is only one redirect and not two. Then you don't need to worry about the flash message. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When requiring multifactor authentication for a route and using a single MFA method, the request will redirect to
/multifactor-auth
, then redirect to e.g./otp-auth
. However, on the second redirect, the original error flash message telling the user they need to authenticate with an additional factor is lost.Are you open to a pull request for keeping the flash message? My first idea was to check if there is anything in
flash[:error]
in/multifactor-auth
, and thenset_redirect_error_flash
to that value. However, I'm not sure whether this will work with internal_request, whereflash
is a string and not a hash. Another idea was to modifytwo_factor_auth_required_redirect
to redirect straight to the auth page of the specific MFA method, using the logic in/multifactor-auth
.What are your thoughts on this?
Beta Was this translation helpful? Give feedback.
All reactions