Hello,
I am trying to enable MFA through an action during the authentication pipeline.
By reading this article, it seems possible to do so:
Here is the content of my action (at the end, I would like to add some business logic to enable or not the MFA depending of some conditions like the requested scope for instance)
exports.onExecutePostLogin = async (event, api) => {
api.multifactor.enable("any");
};
I tried like this but no MFA have been requested.
I enabled those MFA from the dashboard:
- WebAuthn with FIDO Device Biometrics
- One-time Password
And I set to never
the Require Multi-factor Auth
policy (because I want to ask for MFA only on specific conditions)
Thanks in advance for you help !