@azure/msal-react 5.3.2 → 5.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/MsalContext.js +1 -1
- package/dist/MsalProvider.js +1 -1
- package/dist/components/AuthenticatedTemplate.js +1 -1
- package/dist/components/MsalAuthenticationTemplate.js +1 -1
- package/dist/components/UnauthenticatedTemplate.js +1 -1
- package/dist/components/withMsal.js +1 -1
- package/dist/error/ReactAuthError.js +1 -1
- package/dist/hooks/useAccount.js +1 -1
- package/dist/hooks/useIsAuthenticated.js +1 -1
- package/dist/hooks/useMsal.js +1 -1
- package/dist/hooks/useMsalAuthentication.js +1 -1
- package/dist/index.js +1 -1
- package/dist/packageMetadata.js +2 -2
- package/dist/utils/utilities.js +1 -1
- package/lib/msal-react.cjs +2 -2
- package/package.json +10 -7
- package/src/packageMetadata.ts +1 -1
- package/{dist → types}/MsalContext.d.ts +1 -0
- package/types/MsalContext.d.ts.map +1 -0
- package/{lib/types → types}/MsalProvider.d.ts +1 -0
- package/types/MsalProvider.d.ts.map +1 -0
- package/{dist → types}/components/AuthenticatedTemplate.d.ts +1 -0
- package/types/components/AuthenticatedTemplate.d.ts.map +1 -0
- package/{lib/types → types}/components/MsalAuthenticationTemplate.d.ts +1 -0
- package/types/components/MsalAuthenticationTemplate.d.ts.map +1 -0
- package/{dist → types}/components/UnauthenticatedTemplate.d.ts +1 -0
- package/types/components/UnauthenticatedTemplate.d.ts.map +1 -0
- package/{dist → types}/components/withMsal.d.ts +1 -0
- package/types/components/withMsal.d.ts.map +1 -0
- package/{dist → types}/error/ReactAuthError.d.ts +1 -0
- package/types/error/ReactAuthError.d.ts.map +1 -0
- package/{dist → types}/hooks/useAccount.d.ts +1 -0
- package/types/hooks/useAccount.d.ts.map +1 -0
- package/{lib/types → types}/hooks/useIsAuthenticated.d.ts +1 -0
- package/types/hooks/useIsAuthenticated.d.ts.map +1 -0
- package/{dist → types}/hooks/useMsal.d.ts +1 -0
- package/types/hooks/useMsal.d.ts.map +1 -0
- package/{dist → types}/hooks/useMsalAuthentication.d.ts +1 -0
- package/types/hooks/useMsalAuthentication.d.ts.map +1 -0
- package/types/index.d.cts +1 -0
- package/{lib/types → types}/index.d.ts +1 -0
- package/types/index.d.ts.map +1 -0
- package/types/packageMetadata.d.ts +3 -0
- package/types/packageMetadata.d.ts.map +1 -0
- package/{dist → types}/types/AccountIdentifiers.d.ts +1 -0
- package/types/types/AccountIdentifiers.d.ts.map +1 -0
- package/{dist → types}/utils/utilities.d.ts +1 -0
- package/types/utils/utilities.d.ts.map +1 -0
- package/dist/MsalProvider.d.ts +0 -9
- package/dist/components/MsalAuthenticationTemplate.d.ts +0 -16
- package/dist/hooks/useIsAuthenticated.d.ts +0 -6
- package/dist/index.d.ts +0 -24
- package/dist/packageMetadata.d.ts +0 -2
- package/dist/tsdoc-metadata.json +0 -11
- package/lib/types/MsalContext.d.ts +0 -10
- package/lib/types/components/AuthenticatedTemplate.d.ts +0 -8
- package/lib/types/components/UnauthenticatedTemplate.d.ts +0 -8
- package/lib/types/components/withMsal.d.ts +0 -11
- package/lib/types/error/ReactAuthError.d.ts +0 -16
- package/lib/types/hooks/useAccount.d.ts +0 -13
- package/lib/types/hooks/useMsal.d.ts +0 -5
- package/lib/types/hooks/useMsalAuthentication.d.ts +0 -18
- package/lib/types/packageMetadata.d.ts +0 -2
- package/lib/types/types/AccountIdentifiers.d.ts +0 -2
- package/lib/types/utils/utilities.d.ts +0 -17
package/dist/MsalContext.js
CHANGED
package/dist/MsalProvider.js
CHANGED
package/dist/hooks/useAccount.js
CHANGED
package/dist/hooks/useMsal.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @azure/msal-react v5.
|
|
1
|
+
/*! @azure/msal-react v5.4.1 2026-05-11 */
|
|
2
2
|
'use strict';
|
|
3
3
|
import { useState, useRef, useEffect, useCallback } from 'react';
|
|
4
4
|
import { InteractionStatus, BrowserUtils, InteractionRequiredAuthError, InteractionType, OIDC_DEFAULT_SCOPES } from '@azure/msal-browser';
|
package/dist/index.js
CHANGED
package/dist/packageMetadata.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/*! @azure/msal-react v5.
|
|
1
|
+
/*! @azure/msal-react v5.4.1 2026-05-11 */
|
|
2
2
|
'use strict';
|
|
3
3
|
/* eslint-disable header/header */
|
|
4
4
|
const name = "@azure/msal-react";
|
|
5
|
-
const version = "5.
|
|
5
|
+
const version = "5.4.1";
|
|
6
6
|
|
|
7
7
|
export { name, version };
|
|
8
8
|
//# sourceMappingURL=packageMetadata.js.map
|
package/dist/utils/utilities.js
CHANGED
package/lib/msal-react.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @azure/msal-react v5.
|
|
1
|
+
/*! @azure/msal-react v5.4.1 2026-05-11 */
|
|
2
2
|
'use strict';
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
@@ -104,7 +104,7 @@ function getAccountByIdentifiers(allAccounts, accountIdentifiers) {
|
|
|
104
104
|
|
|
105
105
|
/* eslint-disable header/header */
|
|
106
106
|
const name = "@azure/msal-react";
|
|
107
|
-
const version = "5.
|
|
107
|
+
const version = "5.4.1";
|
|
108
108
|
|
|
109
109
|
/*
|
|
110
110
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@azure/msal-react",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.4.1",
|
|
4
4
|
"author": {
|
|
5
5
|
"name": "Microsoft",
|
|
6
6
|
"email": "nugetaad@microsoft.com",
|
|
@@ -14,16 +14,16 @@
|
|
|
14
14
|
"description": "Microsoft Authentication Library for React",
|
|
15
15
|
"type": "module",
|
|
16
16
|
"module": "dist/index.js",
|
|
17
|
-
"types": "
|
|
17
|
+
"types": "types/index.d.ts",
|
|
18
18
|
"main": "lib/msal-react.cjs",
|
|
19
19
|
"exports": {
|
|
20
20
|
".": {
|
|
21
21
|
"import": {
|
|
22
|
-
"types": "./
|
|
22
|
+
"types": "./types/index.d.ts",
|
|
23
23
|
"default": "./dist/index.js"
|
|
24
24
|
},
|
|
25
25
|
"require": {
|
|
26
|
-
"types": "./
|
|
26
|
+
"types": "./types/index.d.cts",
|
|
27
27
|
"default": "./lib/msal-react.cjs"
|
|
28
28
|
}
|
|
29
29
|
},
|
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
},
|
|
32
32
|
"files": [
|
|
33
33
|
"dist",
|
|
34
|
+
"types",
|
|
34
35
|
"lib",
|
|
35
36
|
"src"
|
|
36
37
|
],
|
|
@@ -43,7 +44,9 @@
|
|
|
43
44
|
]
|
|
44
45
|
},
|
|
45
46
|
"scripts": {
|
|
46
|
-
"
|
|
47
|
+
"clean": "shx rm -rf dist types lib",
|
|
48
|
+
"build": "npm run clean && rollup -c --strictDeprecations --bundleConfigAsCjs && npm run build:types",
|
|
49
|
+
"build:types": "tsc -p tsconfig.build.types.json",
|
|
47
50
|
"build:modules:watch": "rollup -cw --bundleConfigAsCjs",
|
|
48
51
|
"test": "jest --forceExit",
|
|
49
52
|
"test:coverage": "jest --coverage",
|
|
@@ -56,11 +59,11 @@
|
|
|
56
59
|
"apiExtractor": "api-extractor run"
|
|
57
60
|
},
|
|
58
61
|
"peerDependencies": {
|
|
59
|
-
"@azure/msal-browser": "^5.
|
|
62
|
+
"@azure/msal-browser": "^5.10.1",
|
|
60
63
|
"react": "^16.8.0 || ^17 || ^18 || ^19.2.1"
|
|
61
64
|
},
|
|
62
65
|
"devDependencies": {
|
|
63
|
-
"@azure/msal-browser": "^5.
|
|
66
|
+
"@azure/msal-browser": "^5.10.1",
|
|
64
67
|
"@microsoft/api-extractor": "^7.43.4",
|
|
65
68
|
"@rollup/plugin-typescript": "^11.1.5",
|
|
66
69
|
"@testing-library/jest-dom": "^5.11.5",
|
package/src/packageMetadata.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MsalContext.d.ts","sourceRoot":"","sources":["../src/MsalContext.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACH,wBAAwB,EAExB,MAAM,EACN,iBAAiB,EACjB,WAAW,EACd,MAAM,qBAAqB,CAAC;AAE7B,MAAM,WAAW,YAAY;IACzB,QAAQ,EAAE,wBAAwB,CAAC;IACnC,UAAU,EAAE,iBAAiB,CAAC;IAC9B,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;CAClB;AAaD,eAAO,MAAM,WAAW,6BACiC,CAAC;AAC1D,eAAO,MAAM,YAAY,8BAAuB,CAAC"}
|
|
@@ -7,3 +7,4 @@ export type MsalProviderProps = PropsWithChildren<{
|
|
|
7
7
|
* MSAL context provider component. This must be rendered above any other components that use MSAL.
|
|
8
8
|
*/
|
|
9
9
|
export declare function MsalProvider({ instance, children, }: MsalProviderProps): React.ReactElement;
|
|
10
|
+
//# sourceMappingURL=MsalProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MsalProvider.d.ts","sourceRoot":"","sources":["../src/MsalProvider.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,EAGV,iBAAiB,EAEpB,MAAM,OAAO,CAAC;AACf,OAAO,EACH,wBAAwB,EAO3B,MAAM,qBAAqB,CAAC;AAK7B,MAAM,MAAM,iBAAiB,GAAG,iBAAiB,CAAC;IAC9C,QAAQ,EAAE,wBAAwB,CAAC;CACtC,CAAC,CAAC;AAmGH;;GAEG;AACH,wBAAgB,YAAY,CAAC,EACzB,QAAQ,EACR,QAAQ,GACX,EAAE,iBAAiB,GAAG,KAAK,CAAC,YAAY,CAuFxC"}
|
|
@@ -6,3 +6,4 @@ export type AuthenticatedTemplateProps = PropsWithChildren<AccountIdentifiers>;
|
|
|
6
6
|
* @param props
|
|
7
7
|
*/
|
|
8
8
|
export declare function AuthenticatedTemplate({ username, homeAccountId, localAccountId, children, }: AuthenticatedTemplateProps): React.ReactElement | null;
|
|
9
|
+
//# sourceMappingURL=AuthenticatedTemplate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AuthenticatedTemplate.d.ts","sourceRoot":"","sources":["../../src/components/AuthenticatedTemplate.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,EAAE,iBAAiB,EAAW,MAAM,OAAO,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAMpE,MAAM,MAAM,0BAA0B,GAAG,iBAAiB,CAAC,kBAAkB,CAAC,CAAC;AAE/E;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,EAClC,QAAQ,EACR,aAAa,EACb,cAAc,EACd,QAAQ,GACX,EAAE,0BAA0B,GAAG,KAAK,CAAC,YAAY,GAAG,IAAI,CAmBxD"}
|
|
@@ -14,3 +14,4 @@ export type MsalAuthenticationProps = PropsWithChildren<AccountIdentifiers & {
|
|
|
14
14
|
* @param props
|
|
15
15
|
*/
|
|
16
16
|
export declare function MsalAuthenticationTemplate({ interactionType, username, homeAccountId, localAccountId, authenticationRequest, loadingComponent: LoadingComponent, errorComponent: ErrorComponent, children, }: MsalAuthenticationProps): React.ReactElement | null;
|
|
17
|
+
//# sourceMappingURL=MsalAuthenticationTemplate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MsalAuthenticationTemplate.d.ts","sourceRoot":"","sources":["../../src/components/MsalAuthenticationTemplate.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,EAAE,iBAAiB,EAAW,MAAM,OAAO,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAGpE,OAAO,EACH,wBAAwB,EAE3B,MAAM,mCAAmC,CAAC;AAE3C,OAAO,EACH,eAAe,EACf,YAAY,EACZ,eAAe,EACf,gBAAgB,EAEnB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,MAAM,MAAM,uBAAuB,GAAG,iBAAiB,CACnD,kBAAkB,GAAG;IACjB,eAAe,EAAE,eAAe,CAAC;IACjC,qBAAqB,CAAC,EAChB,YAAY,GACZ,eAAe,GACf,gBAAgB,CAAC;IACvB,gBAAgB,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC;IACnD,cAAc,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,wBAAwB,CAAC,CAAC;CAChE,CACJ,CAAC;AAEF;;;GAGG;AACH,wBAAgB,0BAA0B,CAAC,EACvC,eAAe,EACf,QAAQ,EACR,aAAa,EACb,cAAc,EACd,qBAAqB,EACrB,gBAAgB,EAAE,gBAAgB,EAClC,cAAc,EAAE,cAAc,EAC9B,QAAQ,GACX,EAAE,uBAAuB,GAAG,KAAK,CAAC,YAAY,GAAG,IAAI,CAqCrD"}
|
|
@@ -6,3 +6,4 @@ export type UnauthenticatedTemplateProps = PropsWithChildren<AccountIdentifiers>
|
|
|
6
6
|
* @param props
|
|
7
7
|
*/
|
|
8
8
|
export declare function UnauthenticatedTemplate({ username, homeAccountId, localAccountId, children, }: UnauthenticatedTemplateProps): React.ReactElement | null;
|
|
9
|
+
//# sourceMappingURL=UnauthenticatedTemplate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UnauthenticatedTemplate.d.ts","sourceRoot":"","sources":["../../src/components/UnauthenticatedTemplate.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,EAAE,iBAAiB,EAAW,MAAM,OAAO,CAAC;AAI1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAGpE,MAAM,MAAM,4BAA4B,GACpC,iBAAiB,CAAC,kBAAkB,CAAC,CAAC;AAE1C;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,EACpC,QAAQ,EACR,aAAa,EACb,cAAc,EACd,QAAQ,GACX,EAAE,4BAA4B,GAAG,KAAK,CAAC,YAAY,GAAG,IAAI,CAuB1D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"withMsal.d.ts","sourceRoot":"","sources":["../../src/components/withMsal.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjD,MAAM,MAAM,aAAa,GAAG;IACxB,WAAW,EAAE,YAAY,CAAC;CAC7B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,QAAQ,qHAepB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReactAuthError.d.ts","sourceRoot":"","sources":["../../src/error/ReactAuthError.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEhD,eAAO,MAAM,qBAAqB;;;;;;;;;CASjC,CAAC;AAEF,qBAAa,cAAe,SAAQ,SAAS;gBAC7B,SAAS,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM;IAOpD,MAAM,CAAC,iCAAiC,IAAI,cAAc;IAO1D,MAAM,CAAC,wCAAwC,IAAI,cAAc;CAMpE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAccount.d.ts","sourceRoot":"","sources":["../../src/hooks/useAccount.ts"],"names":[],"mappings":"AAMA,OAAO,EACH,WAAW,EAOd,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAuBpE;;;;GAIG;AACH,wBAAgB,kBAAkB,CAC9B,QAAQ,EAAE,WAAW,GAAG,IAAI,EAC5B,QAAQ,EAAE,WAAW,GAAG,IAAI,GAC7B,OAAO,CAsBT;AAED;;;GAGG;AACH,wBAAgB,UAAU,CACtB,kBAAkB,CAAC,EAAE,kBAAkB,GACxC,WAAW,GAAG,IAAI,CA+CpB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useIsAuthenticated.d.ts","sourceRoot":"","sources":["../../src/hooks/useIsAuthenticated.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAoBpE;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,YAAY,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAW7E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useMsal.d.ts","sourceRoot":"","sources":["../../src/hooks/useMsal.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,YAAY,EAAe,MAAM,mBAAmB,CAAC;AAE9D;;GAEG;AACH,eAAO,MAAM,OAAO,QAAO,YAAuC,CAAC"}
|
|
@@ -16,3 +16,4 @@ export type MsalAuthenticationResult = {
|
|
|
16
16
|
* @param accountIdentifiers
|
|
17
17
|
*/
|
|
18
18
|
export declare function useMsalAuthentication(interactionType: InteractionType, authenticationRequest?: PopupRequest | RedirectRequest | SsoSilentRequest, accountIdentifiers?: AccountIdentifiers): MsalAuthenticationResult;
|
|
19
|
+
//# sourceMappingURL=useMsalAuthentication.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useMsalAuthentication.d.ts","sourceRoot":"","sources":["../../src/hooks/useMsalAuthentication.ts"],"names":[],"mappings":"AAMA,OAAO,EACH,YAAY,EACZ,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,oBAAoB,EACpB,SAAS,EAET,aAAa,EAIhB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAKpE,MAAM,MAAM,wBAAwB,GAAG;IACnC,KAAK,EAAE,CACH,uBAAuB,CAAC,EAAE,eAAe,GAAG,SAAS,EACrD,eAAe,CAAC,EAAE,YAAY,GAAG,eAAe,GAAG,aAAa,KAC/D,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC,CAAC;IAC1C,YAAY,EAAE,CACV,uBAAuB,CAAC,EAAE,eAAe,GAAG,SAAS,EACrD,eAAe,CAAC,EAAE,aAAa,GAAG,SAAS,KAC1C,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC,CAAC;IAC1C,MAAM,EAAE,oBAAoB,GAAG,IAAI,CAAC;IACpC,KAAK,EAAE,SAAS,GAAG,IAAI,CAAC;CAC3B,CAAC;AAEF;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CACjC,eAAe,EAAE,eAAe,EAChC,qBAAqB,CAAC,EAAE,YAAY,GAAG,eAAe,GAAG,gBAAgB,EACzE,kBAAkB,CAAC,EAAE,kBAAkB,GACxC,wBAAwB,CAsP1B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./index.js";
|
|
@@ -22,3 +22,4 @@ export { useAccount } from "./hooks/useAccount.js";
|
|
|
22
22
|
export { useIsAuthenticated } from "./hooks/useIsAuthenticated.js";
|
|
23
23
|
export { useMsalAuthentication } from "./hooks/useMsalAuthentication.js";
|
|
24
24
|
export { version } from "./packageMetadata.js";
|
|
25
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA;;;GAGG;AAEH,YAAY,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrD,YAAY,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAC3D,YAAY,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AACjF,YAAY,EAAE,uBAAuB,EAAE,MAAM,4CAA4C,CAAC;AAC1F,YAAY,EAAE,0BAA0B,EAAE,MAAM,uCAAuC,CAAC;AACxF,YAAY,EAAE,4BAA4B,EAAE,MAAM,yCAAyC,CAAC;AAC5F,YAAY,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAC9D,YAAY,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAExE,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,OAAO,EAAE,qBAAqB,EAAE,MAAM,uCAAuC,CAAC;AAC9E,OAAO,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AAClF,OAAO,EAAE,0BAA0B,EAAE,MAAM,4CAA4C,CAAC;AAExF,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAE9E,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AAEzE,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"packageMetadata.d.ts","sourceRoot":"","sources":["../src/packageMetadata.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,IAAI,sBAAsB,CAAC;AACxC,eAAO,MAAM,OAAO,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AccountIdentifiers.d.ts","sourceRoot":"","sources":["../../src/types/AccountIdentifiers.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAElD,MAAM,MAAM,kBAAkB,GAAG,OAAO,CACpC,IAAI,CAAC,WAAW,EAAE,eAAe,GAAG,gBAAgB,GAAG,UAAU,CAAC,CACrE,CAAC"}
|
|
@@ -15,3 +15,4 @@ export type Subtract<T extends T1, T1 extends object> = Pick<T, SetComplement<ke
|
|
|
15
15
|
export declare function accountArraysAreEqual(arrayA: Array<AccountIdentifiers>, arrayB: Array<AccountIdentifiers>): boolean;
|
|
16
16
|
export declare function getAccountByIdentifiers(allAccounts: AccountInfo[], accountIdentifiers: AccountIdentifiers): AccountInfo | null;
|
|
17
17
|
export {};
|
|
18
|
+
//# sourceMappingURL=utilities.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utilities.d.ts","sourceRoot":"","sources":["../../src/utils/utilities.ts"],"names":[],"mappings":";AAKA,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAElD,KAAK,YAAY,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,KAAK,KAAK,CAAC,SAAS,CAAC;AAEpD,wBAAgB,qBAAqB,CAAC,CAAC,EACnC,QAAQ,EAAE,KAAK,CAAC,SAAS,GAAG,YAAY,EACxC,IAAI,EAAE,CAAC,GACR,KAAK,CAAC,SAAS,CAKjB;AAMD,MAAM,MAAM,aAAa,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,KAAK,GAAG,CAAC,CAAC;AAC1D,MAAM,MAAM,aAAa,CAAC,CAAC,EAAE,EAAE,SAAS,CAAC,IAAI,aAAa,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;AAClE,MAAM,MAAM,QAAQ,CAAC,CAAC,SAAS,EAAE,EAAE,EAAE,SAAS,MAAM,IAAI,IAAI,CACxD,CAAC,EACD,aAAa,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC,CACnC,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,qBAAqB,CACjC,MAAM,EAAE,KAAK,CAAC,kBAAkB,CAAC,EACjC,MAAM,EAAE,KAAK,CAAC,kBAAkB,CAAC,GAClC,OAAO,CAmBT;AAED,wBAAgB,uBAAuB,CACnC,WAAW,EAAE,WAAW,EAAE,EAC1B,kBAAkB,EAAE,kBAAkB,GACvC,WAAW,GAAG,IAAI,CAqCpB"}
|
package/dist/MsalProvider.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React, { PropsWithChildren } from "react";
|
|
2
|
-
import { IPublicClientApplication } from "@azure/msal-browser";
|
|
3
|
-
export type MsalProviderProps = PropsWithChildren<{
|
|
4
|
-
instance: IPublicClientApplication;
|
|
5
|
-
}>;
|
|
6
|
-
/**
|
|
7
|
-
* MSAL context provider component. This must be rendered above any other components that use MSAL.
|
|
8
|
-
*/
|
|
9
|
-
export declare function MsalProvider({ instance, children, }: MsalProviderProps): React.ReactElement;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import React, { PropsWithChildren } from "react";
|
|
2
|
-
import { AccountIdentifiers } from "../types/AccountIdentifiers.js";
|
|
3
|
-
import { MsalAuthenticationResult } from "../hooks/useMsalAuthentication.js";
|
|
4
|
-
import { InteractionType, PopupRequest, RedirectRequest, SsoSilentRequest } from "@azure/msal-browser";
|
|
5
|
-
import { IMsalContext } from "../MsalContext.js";
|
|
6
|
-
export type MsalAuthenticationProps = PropsWithChildren<AccountIdentifiers & {
|
|
7
|
-
interactionType: InteractionType;
|
|
8
|
-
authenticationRequest?: PopupRequest | RedirectRequest | SsoSilentRequest;
|
|
9
|
-
loadingComponent?: React.ElementType<IMsalContext>;
|
|
10
|
-
errorComponent?: React.ElementType<MsalAuthenticationResult>;
|
|
11
|
-
}>;
|
|
12
|
-
/**
|
|
13
|
-
* Attempts to authenticate user if not already authenticated, then renders child components
|
|
14
|
-
* @param props
|
|
15
|
-
*/
|
|
16
|
-
export declare function MsalAuthenticationTemplate({ interactionType, username, homeAccountId, localAccountId, authenticationRequest, loadingComponent: LoadingComponent, errorComponent: ErrorComponent, children, }: MsalAuthenticationProps): React.ReactElement | null;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { AccountIdentifiers } from "../types/AccountIdentifiers.js";
|
|
2
|
-
/**
|
|
3
|
-
* Returns whether or not a user is currently signed-in. Optionally provide 1 or more accountIdentifiers to determine if a specific user is signed-in
|
|
4
|
-
* @param matchAccount
|
|
5
|
-
*/
|
|
6
|
-
export declare function useIsAuthenticated(matchAccount?: AccountIdentifiers): boolean;
|
package/dist/index.d.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @packageDocumentation
|
|
3
|
-
* @module @azure/msal-react
|
|
4
|
-
*/
|
|
5
|
-
export type { IMsalContext } from "./MsalContext.js";
|
|
6
|
-
export type { MsalProviderProps } from "./MsalProvider.js";
|
|
7
|
-
export type { MsalAuthenticationResult } from "./hooks/useMsalAuthentication.js";
|
|
8
|
-
export type { MsalAuthenticationProps } from "./components/MsalAuthenticationTemplate.js";
|
|
9
|
-
export type { AuthenticatedTemplateProps } from "./components/AuthenticatedTemplate.js";
|
|
10
|
-
export type { UnauthenticatedTemplateProps } from "./components/UnauthenticatedTemplate.js";
|
|
11
|
-
export type { WithMsalProps } from "./components/withMsal.js";
|
|
12
|
-
export type { AccountIdentifiers } from "./types/AccountIdentifiers.js";
|
|
13
|
-
export { MsalContext, MsalConsumer } from "./MsalContext.js";
|
|
14
|
-
export { MsalProvider } from "./MsalProvider.js";
|
|
15
|
-
export { AuthenticatedTemplate } from "./components/AuthenticatedTemplate.js";
|
|
16
|
-
export { UnauthenticatedTemplate } from "./components/UnauthenticatedTemplate.js";
|
|
17
|
-
export { MsalAuthenticationTemplate } from "./components/MsalAuthenticationTemplate.js";
|
|
18
|
-
export { withMsal } from "./components/withMsal.js";
|
|
19
|
-
export { Subtract, SetComplement, SetDifference } from "./utils/utilities.js";
|
|
20
|
-
export { useMsal } from "./hooks/useMsal.js";
|
|
21
|
-
export { useAccount } from "./hooks/useAccount.js";
|
|
22
|
-
export { useIsAuthenticated } from "./hooks/useIsAuthenticated.js";
|
|
23
|
-
export { useMsalAuthentication } from "./hooks/useMsalAuthentication.js";
|
|
24
|
-
export { version } from "./packageMetadata.js";
|
package/dist/tsdoc-metadata.json
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
// This file is read by tools that parse documentation comments conforming to the TSDoc standard.
|
|
2
|
-
// It should be published with your NPM package. It should not be tracked by Git.
|
|
3
|
-
{
|
|
4
|
-
"tsdocVersion": "0.12",
|
|
5
|
-
"toolPackages": [
|
|
6
|
-
{
|
|
7
|
-
"packageName": "@microsoft/api-extractor",
|
|
8
|
-
"packageVersion": "7.57.6"
|
|
9
|
-
}
|
|
10
|
-
]
|
|
11
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { IPublicClientApplication, Logger, InteractionStatus, AccountInfo } from "@azure/msal-browser";
|
|
3
|
-
export interface IMsalContext {
|
|
4
|
-
instance: IPublicClientApplication;
|
|
5
|
-
inProgress: InteractionStatus;
|
|
6
|
-
accounts: AccountInfo[];
|
|
7
|
-
logger: Logger;
|
|
8
|
-
}
|
|
9
|
-
export declare const MsalContext: React.Context<IMsalContext>;
|
|
10
|
-
export declare const MsalConsumer: React.Consumer<IMsalContext>;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React, { PropsWithChildren } from "react";
|
|
2
|
-
import { AccountIdentifiers } from "../types/AccountIdentifiers.js";
|
|
3
|
-
export type AuthenticatedTemplateProps = PropsWithChildren<AccountIdentifiers>;
|
|
4
|
-
/**
|
|
5
|
-
* Renders child components if user is authenticated
|
|
6
|
-
* @param props
|
|
7
|
-
*/
|
|
8
|
-
export declare function AuthenticatedTemplate({ username, homeAccountId, localAccountId, children, }: AuthenticatedTemplateProps): React.ReactElement | null;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React, { PropsWithChildren } from "react";
|
|
2
|
-
import { AccountIdentifiers } from "../types/AccountIdentifiers.js";
|
|
3
|
-
export type UnauthenticatedTemplateProps = PropsWithChildren<AccountIdentifiers>;
|
|
4
|
-
/**
|
|
5
|
-
* Renders child components if user is unauthenticated
|
|
6
|
-
* @param props
|
|
7
|
-
*/
|
|
8
|
-
export declare function UnauthenticatedTemplate({ username, homeAccountId, localAccountId, children, }: UnauthenticatedTemplateProps): React.ReactElement | null;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { IMsalContext } from "../MsalContext.js";
|
|
3
|
-
import { Subtract } from "../utils/utilities.js";
|
|
4
|
-
export type WithMsalProps = {
|
|
5
|
-
msalContext: IMsalContext;
|
|
6
|
-
};
|
|
7
|
-
/**
|
|
8
|
-
* Higher order component wraps provided component with msal by injecting msal context values into the component's props
|
|
9
|
-
* @param Component
|
|
10
|
-
*/
|
|
11
|
-
export declare const withMsal: <P extends WithMsalProps>(Component: React.ComponentType<P>) => React.FunctionComponent<Subtract<P, WithMsalProps>>;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { AuthError } from "@azure/msal-browser";
|
|
2
|
-
export declare const ReactAuthErrorMessage: {
|
|
3
|
-
invalidInteractionType: {
|
|
4
|
-
code: string;
|
|
5
|
-
desc: string;
|
|
6
|
-
};
|
|
7
|
-
unableToFallbackToInteraction: {
|
|
8
|
-
code: string;
|
|
9
|
-
desc: string;
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
export declare class ReactAuthError extends AuthError {
|
|
13
|
-
constructor(errorCode: string, errorMessage?: string);
|
|
14
|
-
static createInvalidInteractionTypeError(): ReactAuthError;
|
|
15
|
-
static createUnableToFallbackToInteractionError(): ReactAuthError;
|
|
16
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { AccountInfo } from "@azure/msal-browser";
|
|
2
|
-
import { AccountIdentifiers } from "../types/AccountIdentifiers.js";
|
|
3
|
-
/**
|
|
4
|
-
* Helper function to determine whether 2 accountInfo objects represent the same account
|
|
5
|
-
* @param accountA
|
|
6
|
-
* @param accountB
|
|
7
|
-
*/
|
|
8
|
-
export declare function accountInfoIsEqual(accountA: AccountInfo | null, accountB: AccountInfo | null): boolean;
|
|
9
|
-
/**
|
|
10
|
-
* Given 1 or more accountIdentifiers, returns the Account object if the user is signed-in
|
|
11
|
-
* @param accountIdentifiers
|
|
12
|
-
*/
|
|
13
|
-
export declare function useAccount(accountIdentifiers?: AccountIdentifiers): AccountInfo | null;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { PopupRequest, RedirectRequest, SsoSilentRequest, InteractionType, AuthenticationResult, AuthError, SilentRequest } from "@azure/msal-browser";
|
|
2
|
-
import { AccountIdentifiers } from "../types/AccountIdentifiers.js";
|
|
3
|
-
export type MsalAuthenticationResult = {
|
|
4
|
-
login: (callbackInteractionType?: InteractionType | undefined, callbackRequest?: PopupRequest | RedirectRequest | SilentRequest) => Promise<AuthenticationResult | null>;
|
|
5
|
-
acquireToken: (callbackInteractionType?: InteractionType | undefined, callbackRequest?: SilentRequest | undefined) => Promise<AuthenticationResult | null>;
|
|
6
|
-
result: AuthenticationResult | null;
|
|
7
|
-
error: AuthError | null;
|
|
8
|
-
};
|
|
9
|
-
/**
|
|
10
|
-
* If a user is not currently signed in this hook invokes a login. Failed logins can be retried using the login callback returned.
|
|
11
|
-
* If a user is currently signed in this hook attempts to acquire a token. Subsequent token requests can use the acquireToken callback returned.
|
|
12
|
-
* Optionally provide a request object to be used in the login/acquireToken call.
|
|
13
|
-
* Optionally provide a specific user that should be logged in.
|
|
14
|
-
* @param interactionType
|
|
15
|
-
* @param authenticationRequest
|
|
16
|
-
* @param accountIdentifiers
|
|
17
|
-
*/
|
|
18
|
-
export declare function useMsalAuthentication(interactionType: InteractionType, authenticationRequest?: PopupRequest | RedirectRequest | SsoSilentRequest, accountIdentifiers?: AccountIdentifiers): MsalAuthenticationResult;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { AccountIdentifiers } from "../types/AccountIdentifiers.js";
|
|
3
|
-
import { AccountInfo } from "@azure/msal-browser";
|
|
4
|
-
type FaaCFunction = <T>(args: T) => React.ReactNode;
|
|
5
|
-
export declare function getChildrenOrFunction<T>(children: React.ReactNode | FaaCFunction, args: T): React.ReactNode;
|
|
6
|
-
export type SetDifference<A, B> = A extends B ? never : A;
|
|
7
|
-
export type SetComplement<A, A1 extends A> = SetDifference<A, A1>;
|
|
8
|
-
export type Subtract<T extends T1, T1 extends object> = Pick<T, SetComplement<keyof T, keyof T1>>;
|
|
9
|
-
/**
|
|
10
|
-
* Helper function to determine whether 2 arrays are equal
|
|
11
|
-
* Used to avoid unnecessary state updates
|
|
12
|
-
* @param arrayA
|
|
13
|
-
* @param arrayB
|
|
14
|
-
*/
|
|
15
|
-
export declare function accountArraysAreEqual(arrayA: Array<AccountIdentifiers>, arrayB: Array<AccountIdentifiers>): boolean;
|
|
16
|
-
export declare function getAccountByIdentifiers(allAccounts: AccountInfo[], accountIdentifiers: AccountIdentifiers): AccountInfo | null;
|
|
17
|
-
export {};
|