You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
export{BrowserAuthErrorCodes};// Allow importing as "BrowserAuthErrorCodes"
9
9
10
-
constErrorLink="For more visit: aka.ms/msaljs/browser-errors";
11
-
12
-
/**
13
-
* BrowserAuthErrorMessage class containing string constants used by error codes and messages.
14
-
*/
15
-
exportconstBrowserAuthErrorMessages={
16
-
[BrowserAuthErrorCodes.pkceNotCreated]:
17
-
"The PKCE code challenge and verifier could not be generated.",
18
-
[BrowserAuthErrorCodes.earJwkEmpty]:
19
-
"No EAR encryption key provided. This is unexpected.",
20
-
[BrowserAuthErrorCodes.earJweEmpty]:
21
-
"Server response does not contain ear_jwe property. This is unexpected.",
22
-
[BrowserAuthErrorCodes.cryptoNonExistent]:
23
-
"The crypto object or function is not available.",
24
-
[BrowserAuthErrorCodes.emptyNavigateUri]:
25
-
"Navigation URI is empty. Please check stack trace for more info.",
26
-
[BrowserAuthErrorCodes.hashEmptyError]: `Hash value cannot be processed because it is empty. Please verify that your redirectUri is not clearing the hash. ${ErrorLink}`,
27
-
[BrowserAuthErrorCodes.noStateInHash]:
28
-
"Hash does not contain state. Please verify that the request originated from msal.",
29
-
[BrowserAuthErrorCodes.hashDoesNotContainKnownProperties]: `Hash does not contain known properites. Please verify that your redirectUri is not changing the hash. ${ErrorLink}`,
30
-
[BrowserAuthErrorCodes.unableToParseState]:
31
-
"Unable to parse state. Please verify that the request originated from msal.",
"Hash contains state but the interaction type does not match the caller.",
34
-
[BrowserAuthErrorCodes.interactionInProgress]: `Interaction is currently in progress. Please ensure that this interaction has been completed before calling an interactive API. ${ErrorLink}`,
35
-
[BrowserAuthErrorCodes.popupWindowError]:
36
-
"Error opening popup window. This can happen if you are using IE or if popups are blocked in the browser.",
37
-
[BrowserAuthErrorCodes.emptyWindowError]:
38
-
"window.open returned null or undefined window object.",
39
-
[BrowserAuthErrorCodes.userCancelled]: "User cancelled the flow.",
40
-
[BrowserAuthErrorCodes.monitorPopupTimeout]: `Token acquisition in popup failed due to timeout. ${ErrorLink}`,
41
-
[BrowserAuthErrorCodes.monitorWindowTimeout]: `Token acquisition in iframe failed due to timeout. ${ErrorLink}`,
42
-
[BrowserAuthErrorCodes.redirectInIframe]:
43
-
"Redirects are not supported for iframed or brokered applications. Please ensure you are using MSAL.js in a top frame of the window if using the redirect APIs, or use the popup APIs.",
44
-
[BrowserAuthErrorCodes.blockIframeReload]: `Request was blocked inside an iframe because MSAL detected an authentication response. ${ErrorLink}`,
45
-
[BrowserAuthErrorCodes.blockNestedPopups]:
46
-
"Request was blocked inside a popup because MSAL detected it was running in a popup.",
47
-
[BrowserAuthErrorCodes.iframeClosedPrematurely]:
48
-
"The iframe being monitored was closed prematurely.",
49
-
[BrowserAuthErrorCodes.silentLogoutUnsupported]:
50
-
"Silent logout not supported. Please call logoutRedirect or logoutPopup instead.",
51
-
[BrowserAuthErrorCodes.noAccountError]:
52
-
"No account object provided to acquireTokenSilent and no active account has been set. Please call setActiveAccount or provide an account on the request.",
53
-
[BrowserAuthErrorCodes.silentPromptValueError]:
54
-
"The value given for the prompt value is not valid for silent requests - must be set to 'none' or 'no_session'.",
"Request cannot contain both spa code and native account id.",
82
-
[BrowserAuthErrorCodes.databaseUnavailable]:
83
-
"IndexedDB, which is required for persistent cryptographic key storage, is unavailable. This may be caused by browser privacy features which block persistent storage in third-party contexts.",
84
-
[BrowserAuthErrorCodes.unableToAcquireTokenFromNativePlatform]: `Unable to acquire token from native platform. ${ErrorLink}`,
85
-
[BrowserAuthErrorCodes.nativeHandshakeTimeout]:
86
-
"Timed out while attempting to establish connection to browser extension",
"Native extension is not installed. If you think this is a mistake call the initialize function.",
89
-
[BrowserAuthErrorCodes.nativeConnectionNotEstablished]: `Connection to native platform has not been established. Please install a compatible browser extension and run initialize(). ${ErrorLink}`,
90
-
[BrowserAuthErrorCodes.uninitializedPublicClientApplication]: `You must call and await the initialize function before attempting to call any other MSAL API. ${ErrorLink}`,
91
-
[BrowserAuthErrorCodes.nativePromptNotSupported]:
92
-
"The provided prompt is not supported by the native platform. This request should be routed to the web based flow.",
93
-
[BrowserAuthErrorCodes.invalidBase64String]:
94
-
"Invalid base64 encoded string.",
95
-
[BrowserAuthErrorCodes.invalidPopTokenRequest]:
96
-
"Invalid PoP token request. The request should not have both a popKid value and signPopToken set to true.",
super(errorCode,`See https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-browser/docs/errors.md#${errorCode} for details`,subError);
"Stub instance of Public Client Application was called. If using msal-react, please ensure context is not used without a provider. For more visit: aka.ms/msaljs/browser-errors",
"Redirect cannot be supported. In-memory storage was selected and storeAuthStateInCookie=false, which would cause the library to be unable to handle the incoming hash. If you would like to use the redirect API, please use session/localStorage or set storeAuthStateInCookie=true.",
17
-
};
18
-
19
9
/**
20
10
* Browser library error class thrown by the MSAL.js library for SPAs
21
11
*/
@@ -32,7 +22,6 @@ export function createBrowserConfigurationAuthError(
Copy file name to clipboardExpand all lines: lib/msal-browser/src/error/NativeAuthError.ts
+1-6Lines changed: 1 addition & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -28,11 +28,6 @@ export type OSError = {
28
28
29
29
constINVALID_METHOD_ERROR=-2147186943;
30
30
31
-
exportconstNativeAuthErrorMessages={
32
-
[NativeAuthErrorCodes.userSwitch]:
33
-
"User attempted to switch accounts in the native broker, which is not allowed. All new accounts must sign-in through the standard web flow first, please try again.",
34
-
};
35
-
36
31
exportclassNativeAuthErrorextendsAuthError{
37
32
ext: OSError|undefined;
38
33
@@ -107,7 +102,7 @@ export function createNativeAuthError(
0 commit comments