feat: wire FEEDBACK_LOGIN_URL for feedback popup login - #134
Draft
zamanafzal wants to merge 1 commit into
Draft
Conversation
Courseware-only learners have no mit-learn session, so their feedback POST is anonymous and 403s. Expose the new FEEDBACK_LOGIN_URL env var and pass it to the smoot-design bundle as `loginUrl`, enabling the popup-login + auto-submit flow. Leaving the var unset keeps the previous direct-POST behavior.
Contributor
Author
|
Flow diagram for the popup-login + auto-submit behavior this env var enables lives on the smoot-design PR: mitodl/smoot-design#246 (comment). This PR only supplies |
Ardiea
approved these changes
Aug 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What are the relevant tickets?
Description (What does it do?)
Wires a new
FEEDBACK_LOGIN_URLenv var through to the smoot-design feedback drawer bundle.A courseware-only learner (logged into
courses.<env>.learn.mit.edubut not MIT Learn) has no mit-learn/APISIX session, so their feedbackPOSTis anonymous and 403s. smoot-design #246 adds an optional popup-login + auto-submit flow that activates only when the bundle receives aloginUrl. This PR supplies it:feedbackBundle.js— exportLOGIN_URLfromprocess.env.FEEDBACK_LOGIN_URL(undefined when unset).FeedbackDrawerSlot.jsx— passloginUrl: LOGIN_URLintomodule.init(...).Leaving
FEEDBACK_LOGIN_URLunset preserves today's direct-POST behavior, so this is safe to merge ahead of enabling the flow per-environment.Screenshots (if appropriate):
n/a (config wiring).
How can this be tested?
FEEDBACK_LOGIN_URL=<mit-learn>/login(e.g.https://api.rc.learn.mit.edu/login) in the Learning MFE env alongside the existingFEEDBACK_*vars, rebuild, and open the feedback drawer while not logged into MIT Learn: Submit opens a login popup and auto-sends the drafted feedback once the session exists.FEEDBACK_LOGIN_URLunset, the drawer submits directly as before.Additional Context
Requires smoot-design #246 to be published and the bundle bumped. Root cause (identity, not CSRF) is documented in the
content-feedbackskill (references/auth-and-identity.md).