MFA Customization / Flexible Factor Selection Not Compatible with the Non-Interactive Flows
Last Updated:
Overview
MFA required. The post login MFA commands are not compatible with the non-interactive flows.
The Flexible Factor Selection is triggered by an Action with these two methods:
- api.authentication.challengeWith(factor, options)
- api.authentication.challengeWithAny(factors)
Cause
Solution
The workaround is to suppress the MFA for such flows or trigger the normal MFA, e.g.:
if(event.transaction.protocol === 'oauth2-resource-owner') {
api.multifactor.enable(provider, options)
} else {
api.authentication.challengeWith(factor, options)
}