Files
AutopilotMonitor/src
Oliver Kieselbach 97ca48f56a fix: stop MSAL-triggered navigation to dashboard while on session detail page
Root cause: MSAL fires handleRedirectPromise twice on page load, causing
isAuthenticated to briefly flip false between the two settlements. This
triggered ProtectedRoute to redirect to '/', which then re-authenticated
and redirected to '/dashboard', causing the dashboard page to mount and
unmount periodically while the user was viewing a session.

Two fixes:
1. navigateToLoginRequestUrl: false — prevents MSAL from navigating to
   the stored login request URL after redirect settlement, eliminating
   the spurious navigation that caused the dashboard to mount.
2. ProtectedRoute unauthenticated redirect now waits 500ms before
   executing, giving MSAL time to complete its double-settlement cycle
   before we conclude the user is truly unauthenticated.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 15:40:32 +01:00
..