fix(ui): add fallback to interaction required error in MsalAuthenticator#27189
fix(ui): add fallback to interaction required error in MsalAuthenticator#27189
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the UI’s MSAL authenticator token renewal path so that when silent token acquisition fails with InteractionRequiredAuthError, renewIdToken will allow an interactive popup fallback instead of immediately failing.
Changes:
- Updated
renewIdTokento callfetchIdToken(true)to enable popup fallback behavior during token renewal.
...etadata-ui/src/main/resources/ui/src/components/Auth/AppAuthenticators/MsalAuthenticator.tsx
Show resolved
Hide resolved
Agent-Logs-Url: https://github.com/open-metadata/OpenMetadata/sessions/b430d4e3-eead-4b95-9b4e-0b6775ca20e6 Co-authored-by: chirag-madlani <12962843+chirag-madlani@users.noreply.github.com>
Code Review ✅ ApprovedAdds fallback handling for interaction required errors in MsalAuthenticator to improve error resilience in the UI authentication flow. No issues found. OptionsDisplay: compact → Showing less information. Comment with these commands to change:
Was this helpful? React with 👍 / 👎 | Gitar |
|
|
Failed to cherry-pick changes to the 1.12.5 branch. |
…tor (#27189) * fix(ui): add fallback to interaction required error * fix(ui): update MsalAuthenticator test to validate popup-fallback path Agent-Logs-Url: https://github.com/open-metadata/OpenMetadata/sessions/b430d4e3-eead-4b95-9b4e-0b6775ca20e6 Co-authored-by: chirag-madlani <12962843+chirag-madlani@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> (cherry picked from commit af7ffe7)
…tor (#27189) * fix(ui): add fallback to interaction required error * fix(ui): update MsalAuthenticator test to validate popup-fallback path Agent-Logs-Url: https://github.com/open-metadata/OpenMetadata/sessions/b430d4e3-eead-4b95-9b4e-0b6775ca20e6 Co-authored-by: chirag-madlani <12962843+chirag-madlani@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> (cherry picked from commit af7ffe7)
🟡 Playwright Results — all passed (23 flaky)✅ 3138 passed · ❌ 0 failed · 🟡 23 flaky · ⏭️ 205 skipped
🟡 23 flaky test(s) (passed on retry)
How to debug locally# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip # view trace |
…tor (open-metadata#27189) * fix(ui): add fallback to interaction required error * fix(ui): update MsalAuthenticator test to validate popup-fallback path Agent-Logs-Url: https://github.com/open-metadata/OpenMetadata/sessions/b430d4e3-eead-4b95-9b4e-0b6775ca20e6 Co-authored-by: chirag-madlani <12962843+chirag-madlani@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
…tor (open-metadata#27189) * fix(ui): add fallback to interaction required error * fix(ui): update MsalAuthenticator test to validate popup-fallback path Agent-Logs-Url: https://github.com/open-metadata/OpenMetadata/sessions/b430d4e3-eead-4b95-9b4e-0b6775ca20e6 Co-authored-by: chirag-madlani <12962843+chirag-madlani@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>



renewIdTokeninMsalAuthenticatorwould propagateInteractionRequiredAuthErrorwhen silent token acquisition failed, instead of attempting an interactive popup fallback. The test suite also asserted this broken behavior.Changes:
MsalAuthenticator.tsx:renewIdTokennow callsfetchIdToken(true), enabling theInteractionRequiredAuthError→loginPopupfallback path instead of throwing immediately.MsalAuthenticator.test.tsx:renewIdTokento throwInteractionRequiredAuthErrorwith two new cases:showErrorToast,Transi18next, andgetPopupSettingLink(used in the popup error-handling branch)Type of change:
Checklist:
Fixes <issue-number>: <short explanation>