Maybe try a resource path like : "../../../conf/authn/checkSecondFactor.js" to keep checkSecondFactor.js in the same directory as mfa-authn-config.xml. Not sure if it works in IdP 4.x, it has for 3.x Tom