Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2020-2024, WSO2 LLC. (https://www.wso2.com).
* Copyright (c) 2020-2026, WSO2 LLC. (https://www.wso2.com).
*
* WSO2 LLC. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
Expand Down Expand Up @@ -565,7 +565,7 @@ export const ScriptBasedFlow: FunctionComponent<AdaptiveScriptsPropsInterface> =
};

const resetAdaptiveScriptTemplateToDefaultHandler = () => {
setSourceCode("");
setSourceCode(AdaptiveScriptUtils.generateScript(authenticationSteps + 1));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we expecting to save the default script when disabling the conditional authentication?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was the previous default behavior for the Classic Editor. It was changed when introducing the Script Update REST API feature [1]. Since this feature is disabled by default, this change introduced a regression in the Classic Editor.

Additionally, since the previous behavior aligns with the Visual Editor, we propose reverting to the earlier implementation to avoid breaking the current flow.

[1] a9c5cf7#diff-6eb727e98b131f02e3e21db95b23fadb0fe174733537a3a163a1e5e0e7faa5c7R579

setIsScriptFromTemplate(false);
onAdaptiveScriptReset();
onConditionalAuthenticationToggle(false);
Expand Down
Loading