Upgrade MSAL library version (#2454)

* Reapply "MSAL browser migration changes"

This reverts commit 60a65efb7b.

* Fix redirect URI for localhost

* Fix URI for logout and other minor fix

* Remove unnecessary files

* Fix tests

* Fix tests

* Run npm format

* Address comments

* Address comment
This commit is contained in:
sindhuba
2026-04-08 10:40:06 -07:00
committed by GitHub
parent fb250259ed
commit 339ba4f295
12 changed files with 103 additions and 49 deletions

View File

@@ -280,7 +280,7 @@ export default class Explorer {
updateUserContext({ aadToken: aadToken });
useDataPlaneRbac.setState({ aadTokenUpdated: true });
} catch (error) {
if (error instanceof msal.AuthError && error.errorCode === msal.BrowserAuthErrorMessage.popUpWindowError.code) {
if (error instanceof msal.AuthError && error.errorCode === msal.BrowserAuthErrorCodes.popupWindowError) {
logConsoleError(
"We were unable to establish authorization for this account, due to pop-ups being disabled in the browser.\nPlease enable pop-ups for this site and try again",
);

View File

@@ -1,7 +1,4 @@
import {
AuthError as msalAuthError,
BrowserAuthErrorMessage as msalBrowserAuthErrorMessage,
} from "@azure/msal-browser";
import { AuthError as msalAuthError, BrowserAuthErrorCodes as msalBrowserAuthErrorCodes } from "@azure/msal-browser";
import {
Checkbox,
ChoiceGroup,
@@ -305,7 +302,7 @@ export const SettingsPane: FunctionComponent<{ explorer: Explorer }> = ({
} catch (authError) {
if (
authError instanceof msalAuthError &&
authError.errorCode === msalBrowserAuthErrorMessage.popUpWindowError.code
authError.errorCode === msalBrowserAuthErrorCodes.popupWindowError
) {
logConsoleError(t(Keys.panes.settings.popupsDisabledError));
} else {