Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with executing a authentication step in Adaptive Script when using filtering options #6824

Closed
sarubi opened this issue Nov 8, 2019 · 0 comments · Fixed by wso2/carbon-identity-framework#2543

Comments

@sarubi
Copy link
Contributor

sarubi commented Nov 8, 2019

  1. Configure sample application ex: Travelocity
  2. configure below authentication steps,
  3. Step1 - basic, facebook, yahoo, twitter
  4. Add the following adaptive script.
function onLoginRequest(context) {
		    handleLoginFlow(context, true);
}
function handleLoginFlow(context, state) {
  	if (state) {
		executeStep(1,{
		  authenticationOptions:[
			 {authenticator:'basic'},{idp:'facebook'}
		  ]
		}, {
				onSuccess: function(context) {},
				onFail: function(context){
				handleLoginFlow(context, false);
		  }
		});
	} else {
	   executeStep(1,{
		  authenticationOptions:[
			{authenticator: 'basic'},{idp: 'yahoo'}
		  ]
		}, {
		onSuccess: function(context) {},
  		onFail: function(context){
		  handleLoginFlow(context, true);
		}
	   });
	}
}

Click login in Travelocity it will redirect to IS basic authentication page along with Other login options: as FB.
Try to provide an incorrect password to IS basic authentication and fail it. then it should redirect to basic authentication along with Other login options: yahoo.
currently, only basic authentication will appear.
The issue is that we update the StepConfig authenticators in each step without cloning or saving the actual (original) configurations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant