Hi Prayang, The entire retry needs to be configured with adaptive script when you enable the script by typing in your own logic. The reason is to give you all the flexibility and provide alternative path when any number of retry fails according to your requirement. There is another thread [1] related to this which will help'
thread : "Retry with authenticators for adaptive authentication." [1] [1] http://mail.wso2.org/mailarchive/dev/2018-May/077267.html Cheers, Ruwan On Wed, Feb 6, 2019 at 12:54 AM prayag pavithran < [email protected]> wrote: > Hi , > > I've the following conditional script for 2 fator authentication (Email > OTP) using WSO2 Identity server. WSO2 identity server version used is > 5.7. > > function onLoginRequest(context) { > executeStep(1,{ > onSuccess: function (context) { > var user = context.steps[1].subject; > var isEmailOTPEnabled = user.localClaims[' > http://wso2.org/claims/enableEmailOTP']; > if(isEmailOTPEnabled==true){ > executeStep(2); > } > }, > onFail: function(context) { > onLoginRequest(context); > } > }); > } > > If i enter a wrong OTP it takes me to Authentication error screen instead > of resend code screen. > > This works well if my conditional script is as follows > > function onLoginRequest(context) { > executeStep(1); > executeStep(2); > } > > Kindly help me solve the issue. > > Thanks & Regards, > Prayag Pavithran > _______________________________________________ > Dev mailing list > [email protected] > http://wso2.org/cgi-bin/mailman/listinfo/dev >
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
