Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "Rename uxNotAllowed error code to uiNotAllowed [#8608](https://github.com/AzureAD/microsoft-authentication-library-for-js/pull/8608)",
"packageName": "@azure/msal-browser",
"email": "198982749+Copilot@users.noreply.github.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "Rename uxNotAllowed error code to uiNotAllowed [#8608](https://github.com/AzureAD/microsoft-authentication-library-for-js/pull/8608)",
"packageName": "@azure/msal-common",
"email": "198982749+Copilot@users.noreply.github.com",
"dependentChangeType": "patch"
}
3 changes: 1 addition & 2 deletions docs/errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -305,11 +305,10 @@ This error occurs when MSAL.js surpasses the allotted storage limit when attempt

- Identity provider returned bad_token due to an expired or invalid refresh token. Please invoke an interactive API to resolve.

### `ux_not_allowed`
### `ui_not_allowed`

- `canShowUI` flag in Edge was set to false. User interaction required on web page. Please invoke an interactive API to resolve.


### `interrupted_user`

- The user could not be authenticated due to an interrupted state. Please invoke an interactive API to resolve.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ export const TRANSIENT_ERROR = "TRANSIENT_ERROR";
export const PERSISTENT_ERROR = "PERSISTENT_ERROR";
export const DISABLED = "DISABLED";
export const ACCOUNT_UNAVAILABLE = "ACCOUNT_UNAVAILABLE";
export const UX_NOT_ALLOWED = "UX_NOT_ALLOWED";
export const UI_NOT_ALLOWED = "UI_NOT_ALLOWED";
4 changes: 2 additions & 2 deletions lib/msal-browser/src/error/NativeAuthError.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@ export function createNativeAuthError(
return createBrowserAuthError(
BrowserAuthErrorCodes.noNetworkConnectivity
);
case NativeStatusCodes.UX_NOT_ALLOWED:
case NativeStatusCodes.UI_NOT_ALLOWED:
return createInteractionRequiredAuthError(
InteractionRequiredAuthErrorCodes.uxNotAllowed
InteractionRequiredAuthErrorCodes.uiNotAllowed
);
Comment thread
lalimasharda marked this conversation as resolved.
}
}
Expand Down
6 changes: 3 additions & 3 deletions lib/msal-browser/test/error/NativeAuthError.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,20 +126,20 @@ describe("NativeAuthError Unit Tests", () => {
);
});

it("translates UX_NOT_ALLOWED status into corresponding InteractionRequiredError", () => {
it("translates UI_NOT_ALLOWED status into corresponding InteractionRequiredError", () => {
const error = createNativeAuthError(
"interaction_required",
"interaction is required",
{
error: 1,
protocol_error: "testProtocolError",
properties: {},
status: NativeStatusCode.UX_NOT_ALLOWED,
status: NativeStatusCode.UI_NOT_ALLOWED,
}
);
expect(error).toBeInstanceOf(InteractionRequiredAuthError);
expect(error.errorCode).toBe(
InteractionRequiredAuthErrorCodes.uxNotAllowed
InteractionRequiredAuthErrorCodes.uiNotAllowed
);
Comment thread
lalimasharda marked this conversation as resolved.
});

Expand Down
8 changes: 4 additions & 4 deletions lib/msal-common/apiReview/msal-common.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -2682,7 +2682,7 @@ declare namespace InteractionRequiredAuthErrorCodes {
noTokensFound,
nativeAccountUnavailable,
refreshTokenExpired,
uxNotAllowed,
uiNotAllowed,
interactionRequired,
consentRequired,
loginRequired,
Expand Down Expand Up @@ -4636,6 +4636,9 @@ const tokenRequestEmpty = "token_request_empty";
// @public
function toSecondsFromDate(date: Date): number;

// @public
const uiNotAllowed = "ui_not_allowed";

// Warning: (ae-missing-release-tag) "unexpectedCredentialType" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
Expand Down Expand Up @@ -4734,9 +4737,6 @@ export { UrlUtils }
// @public (undocumented)
const userCanceled = "user_canceled";

// @public
const uxNotAllowed = "ux_not_allowed";

// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
// Warning: (ae-missing-release-tag) "validateAuthorizationResponse" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
Expand Down
4 changes: 2 additions & 2 deletions lib/msal-common/src/error/InteractionRequiredAuthError.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const InteractionRequiredServerErrorMessage = [
InteractionRequiredAuthErrorCodes.consentRequired,
InteractionRequiredAuthErrorCodes.loginRequired,
InteractionRequiredAuthErrorCodes.badToken,
InteractionRequiredAuthErrorCodes.uxNotAllowed,
InteractionRequiredAuthErrorCodes.uiNotAllowed,
InteractionRequiredAuthErrorCodes.interruptedUser,
];

Expand All @@ -26,7 +26,7 @@ export const InteractionRequiredAuthSubErrorMessage = [
"user_password_expired",
"consent_required",
"bad_token",
"ux_not_allowed",
"ui_not_allowed",
"interrupted_user",
];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ export const refreshTokenExpired = "refresh_token_expired";
* MSAL-defined error code indicating UI/UX is not allowed (e.g., blocked by policy), requiring alternate interaction.
* @public
*/
export const uxNotAllowed = "ux_not_allowed";

export const uiNotAllowed = "ui_not_allowed";
Comment thread
lalimasharda marked this conversation as resolved.
/**
* Server-originated error code indicating interaction is required to complete the request.
* @public
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ describe("InteractionRequiredAuthError.ts Class Unit Tests", () => {
InteractionRequiredAuthErrorCodes.nativeAccountUnavailable,
InteractionRequiredAuthErrorCodes.refreshTokenExpired,
InteractionRequiredAuthErrorCodes.badToken,
Comment thread
lalimasharda marked this conversation as resolved.
InteractionRequiredAuthErrorCodes.uxNotAllowed,
InteractionRequiredAuthErrorCodes.uiNotAllowed,
InteractionRequiredAuthErrorCodes.interruptedUser,
];

Expand Down
Loading