Skip to content

Revert "AUT-31 code changes & implementation for redirection from Legacy page to new Authn MFE"#118

Merged
ferdis merged 1 commit intorelease-ulmofrom
revert-60-AUT-31-code-change-identification-for-enterprise-applications
Feb 11, 2026
Merged

Revert "AUT-31 code changes & implementation for redirection from Legacy page to new Authn MFE"#118
ferdis merged 1 commit intorelease-ulmofrom
revert-60-AUT-31-code-change-identification-for-enterprise-applications

Conversation

@ferdis
Copy link

@ferdis ferdis commented Feb 11, 2026

Reverts #60

Copilot AI review requested due to automatic review settings February 11, 2026 13:54
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR reverts changes from PR #60 that implemented redirection from legacy authentication pages to the new Authn MFE for enterprise customers with specific TPA and SAML configurations.

Changes:

  • Removes enterprise/TPA/SAML conditional logic from the should_redirect_to_authn_microfrontend() function
  • Reverts the boolean environment variable handling for ENABLE_AUTHN_MICROFRONTEND from string comparison back to direct os.environ.get()

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
openedx/core/djangoapps/user_authn/toggles.py Simplifies the authn MFE redirect logic by removing enterprise/TPA/SAML conditional checks
lms/envs/common.py Changes environment variable handling for ENABLE_AUTHN_MICROFRONTEND setting

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

# .. toggle_warning: Also set settings.AUTHN_MICROFRONTEND_URL for rollout. This temporary feature
# toggle does not have a target removal date.
ENABLE_AUTHN_MICROFRONTEND = os.getenv("EDXAPP_ENABLE_AUTHN_MFE", "false").lower() == "true"
ENABLE_AUTHN_MICROFRONTEND = os.environ.get("EDXAPP_ENABLE_AUTHN_MFE", False)
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

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

The use of os.environ.get("EDXAPP_ENABLE_AUTHN_MFE", False) is problematic because when the environment variable is set, it returns a string (e.g., "true", "false", "1", "0"), not a boolean. In Python, any non-empty string is truthy, meaning even setting EDXAPP_ENABLE_AUTHN_MFE="false" would evaluate to True.

This differs from the code being reverted which used .lower() == "true" to properly convert the string to a boolean. The current implementation will incorrectly enable the authn microfrontend whenever the environment variable is set to any non-empty value.

Consider using a proper boolean conversion such as:

  • os.getenv("EDXAPP_ENABLE_AUTHN_MFE", "false").lower() == "true"
  • Or a helper function that safely converts string values to booleans
Suggested change
ENABLE_AUTHN_MICROFRONTEND = os.environ.get("EDXAPP_ENABLE_AUTHN_MFE", False)
ENABLE_AUTHN_MICROFRONTEND = os.getenv("EDXAPP_ENABLE_AUTHN_MFE", "false").lower() == "true"

Copilot uses AI. Check for mistakes.
@ferdis ferdis merged commit f1a0145 into release-ulmo Feb 11, 2026
68 of 69 checks passed
@ferdis ferdis deleted the revert-60-AUT-31-code-change-identification-for-enterprise-applications branch February 11, 2026 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments