Hi,
I am like 3 years late to the party, but I have the exact same issue. I can reproduce it easily, and my scenario is the same. Running openvpn 2.3.10
My PAM call for multi factor authentication take a minimum of 10 - 20 seconds, as the user has to react to an application on their mobile phone. When this is going on, openvpn is blocking.
openvpn config for the pam integration:
plugin /usr/lib/openvpn/openvpn-plugin-auth-pam.so openvpn
The script integration:
sudo cat /etc/pam.d/openvpn
account required pam_permit.so
auth required pam_exec.so expose_authtok /path/to/my/authentication_script