0

I am configuring Advanced Authentication Configuration and now i have two steps with three authenticators:
First step: basic and my custom authenticator.
Second step: for my second step i added Password Reset Enforcer
Is it possible to disable second step for my custom authenticator? My WSO2 IS version is 5.10.0

Community
  • 1
  • 1

1 Answers1

1

Try out this adaptive script.

var onLoginRequest = function(context) {
    executeStep(1, {
        onSuccess: function (context) { 
            if (context.steps[1].options[0].authenticator == "BasicAuthenticator") {
                executeStep(2);
            }
        }
    }); 
};
Anuradha Karunarathna
  • 2,717
  • 2
  • 9
  • 17
  • @Askar Sanbayev This won't work because `context.steps[1].options` contains both options you have added as step 1. Not the selected step option. – Anuradha Karunarathna Apr 25 '21 at 03:42
  • According to the current capability of adaptive step we can only find the selected idp of the step(`context.steps[1].idp`). Since Both of your authenticators are local, context.steps[1].idp = "LOCAL". Therefore you can't skip step 2 by validating the authenticated idp. – Anuradha Karunarathna Apr 25 '21 at 03:48
  • Any ideas how to separate it? – Askar Sanbayev Apr 25 '21 at 08:20