Ready to post? First, try searching for your answer.
Hello,
Expectation
We would like to have Adaptive MFA configured for all users with OTP and Email as enrollment options. We would like to fully disable MFA for test users.
Context:
- We have enabled Adaptive MFA and configured OTP and Email.
- We have a lot of automated test users, for whom we would like to skip any mfa authentication.
- We have added a Post Login action “Bypass MFA for Test user”. In said action we are trying to disable the MFA
In images below you can see how our MFA is configured.
We have found several similar threads how to accomplish it:
- How to disable MFA using actions? - Auth0 Community
- How to disable mfa for a particular user - Auth0 Community
- Disable MFA for enterprise connection - Auth0 Community
We followed solution 1, cause it fits best in our scenario.
Actual result
No matter what we do, user is always prompted with MFA challenge.
Our post-login action looks like this
exports.onExecutePostLogin = async (event, api) => {
api.multifactor.enable('none', {allowRememberBrowser: false});
// api.multifactor.enable('none');
// We tried both of options above, none worked
(...) // logic to enable/disable mfa if needed, but we decided to try to force disabling it for everyone to see it if works
};
Please clarify if this can be achieved or we have misunderstood the documentation. By our findings this should have worked as expected. This is a huge blocker for us as we have a lot of automated tests running.