Hi Team,
I am trying to enable MFA for a specific Client ID, code looks something like this:
exports.onExecutePostLogin = async (event, api) => {
const CLIENTS_WITH_MFA = [ <myClientIdList>
];
if (CLIENTS_WITH_MFA.includes(event.client.client_id)) {
api.multifactor.enable('any', { allowRememberBrowser: false })
}
}
However, if a user has not yet already registered for the MFA, we need the ability to allow the user to configure the MFA. Can you please help us understand:
- how can we check if the user is enabled for MFA or not
- how can we allow the user to register for MFA post login, if he/she has not yet configured?
Thanks in advance.