I am trying to implment step-up authentication using actions. I created a rule that has the following code
function guardianMultifactorStepUpAuthentication(user, context, callback) {
const isMfa =
context.request.query.acr_values ===
'http://schemas.openid.net/pape/policies/2007/06/multi-factor';
if (isMfa) {
context.multifactor = {
provider: 'any',
allowRememberBrowser: false
};
}
callback(null, user, context);
}
My frontend uses auth0-js
library and when I call .authorize
method with acr_values
as http://schemas.openid.net/pape/policies/2007/06/multi-factor
, it takes me to the login page. In my local environment, it takes me to directly to mfa-challenge page where I could enter the OTP and it would redirect back to my application. But in my production environment, it is taking me to the login page instead of taking me to mfa-challenge page. This is bad because user had already logged in using a password and now it’s taking the user back to login page instead of taking to the MFA challenge page directly. Any way I can directly go to the MFA challenge page for Step-Up authentication?
Thanks