My Customer has a regulatory compliance requirement to add secondary authentication prior to any workflow approval, so the approach that I have taken is by defining a custom Action which opens a DialogForm and it handles the authentication part.
It works great, but there is one problem where the state of the workflow changes automatically to the next state when a modal is closed before a user is authenticated.
For example, if a workflow has 3 states (Draft -> Submit (If this has that authentication requirement, then the user has to get stuck in the same state until the user authenticates) -> Approve)
I know the existing out of the box Approve action is handling this scenario but I was not able to track the right dll to see the code. Any help is greatly appreciated.