mitodl / micromasters

Portal for learners and course teams to access MITx Micromasters® programs
https://mm.mit.edu
BSD 3-Clause "New" or "Revised" License
28 stars 16 forks source link

Dashboard redirects to original edxorg login when mitxonline auth is needed. #5327

Closed rhysyngsun closed 1 year ago

rhysyngsun commented 1 year ago

Steps to Reproduce

Expected Behavior

The user is prompted to login with the appropriate backend (edxorg or mitxonline) depending on which requires fresh credentials.

Actual Behavior

The user is always redirected to the default (edxorg) login.

Proposed Fix

I think we should update the dashboard API to soft-fail when we hit an error from edx/openedx. The dashboard should load, although the data will be stale, but that's ok I think since right now we're just failing hard. We should no longer logout the learner and redirect them to the login page.

If it's a 4xx error the UI should display a dialog similar to SocialAuthDialog that informs them they need to reauthenticate. This probably means the dashboard API needs to return some additional information in terms of which API auths are failing. This dialog should be dismissable so the learner can proceed without fixing it should they wish.