@azure/msal-react 3.0.26 → 3.0.28
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/README.md +28 -28
- 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.d.ts +1 -1
- package/dist/packageMetadata.js +2 -2
- package/dist/utils/utilities.js +1 -1
- package/lib/msal-react.cjs +2 -2
- package/lib/types/packageMetadata.d.ts +1 -1
- package/package.json +3 -3
- package/src/packageMetadata.ts +1 -1
package/README.md
CHANGED
|
@@ -4,18 +4,18 @@
|
|
|
4
4
|
[](https://nodei.co/npm/@azure/msal-react/)
|
|
5
5
|
[](https://codecov.io/gh/AzureAD/microsoft-authentication-library-for-js)
|
|
6
6
|
|
|
7
|
-
| <a href="https://docs.microsoft.com/azure/active-directory/develop/tutorial-v2-react" target="blank">Getting Started</a> | <a href="https://aka.ms/aaddevv2" target="_blank">AAD Docs</a> | <a href="https://azuread.github.io/microsoft-authentication-library-for-js/ref/modules/_azure_msal_react.html" target="_blank">Library Reference</a> | <a href="https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/
|
|
7
|
+
| <a href="https://docs.microsoft.com/azure/active-directory/develop/tutorial-v2-react" target="blank">Getting Started</a> | <a href="https://aka.ms/aaddevv2" target="_blank">AAD Docs</a> | <a href="https://azuread.github.io/microsoft-authentication-library-for-js/ref/modules/_azure_msal_react.html" target="_blank">Library Reference</a> | <a href="https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/v4-lts/samples" target="blank">Samples</a> |
|
|
8
8
|
| ------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
|
|
9
9
|
|
|
10
10
|
1. [About](#about)
|
|
11
|
-
1. [FAQ](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/
|
|
12
|
-
1. [Changelog](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/
|
|
11
|
+
1. [FAQ](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/v4-lts/lib/msal-react/FAQ.md)
|
|
12
|
+
1. [Changelog](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/v4-lts/lib/msal-react/CHANGELOG.md)
|
|
13
13
|
1. [Prerequisites](#prerequisites)
|
|
14
14
|
1. [Version Support](#version-support)
|
|
15
15
|
1. [Installation](#installation)
|
|
16
16
|
1. [Build and Test](#build-and-test)
|
|
17
17
|
1. [Usage](#usage)
|
|
18
|
-
- [Getting Started](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/
|
|
18
|
+
- [Getting Started](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/v4-lts/lib/msal-react/docs/getting-started.md)
|
|
19
19
|
- [Msal Basics](#msal-basics)
|
|
20
20
|
- [Advanced Topics](#advanced-topics)
|
|
21
21
|
- [MSAL React Specific Concepts](#msal-react-specific-concepts)
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
|
|
29
29
|
The MSAL library for JavaScript enables client-side JavaScript applications to authenticate users using [Azure AD](https://docs.microsoft.com/azure/active-directory/develop/v2-overview) work and school accounts (AAD), Microsoft personal accounts (MSA) and social identity providers like Facebook, Google, LinkedIn, Microsoft accounts, etc. through [Azure AD B2C](https://docs.microsoft.com/azure/active-directory-b2c/active-directory-b2c-overview#identity-providers) service. It also enables your app to get tokens to access [Microsoft Cloud](https://www.microsoft.com/enterprise) services such as [Microsoft Graph](https://graph.microsoft.io).
|
|
30
30
|
|
|
31
|
-
The `@azure/msal-react` package described by the code in this folder uses the [`@azure/msal-browser` package](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/
|
|
31
|
+
The `@azure/msal-react` package described by the code in this folder uses the [`@azure/msal-browser` package](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/v4-lts/lib/msal-browser) as a peer dependency to enable authentication in Javascript Single-Page Applications without backend servers. This version of the library uses the OAuth 2.0 Authorization Code Flow with PKCE. To read more about this protocol, as well as the differences between implicit flow and authorization code flow, see the section in the [@azure/msal-browser readme](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/v4-lts/lib/msal-browser/README.md#implicit-flow-vs-authorization-code-flow-with-pkce).
|
|
32
32
|
|
|
33
33
|
## Prerequisites
|
|
34
34
|
|
|
@@ -56,7 +56,7 @@ npm install @azure/msal-react @azure/msal-browser
|
|
|
56
56
|
|
|
57
57
|
## Build and Test
|
|
58
58
|
|
|
59
|
-
See the [`contributing.md`](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/
|
|
59
|
+
See the [`contributing.md`](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/v4-lts/contributing.md) file for more information.
|
|
60
60
|
|
|
61
61
|
### Building the package locally
|
|
62
62
|
|
|
@@ -95,44 +95,44 @@ npm run test:coverage
|
|
|
95
95
|
|
|
96
96
|
## Usage
|
|
97
97
|
|
|
98
|
-
For help getting started with `@azure/msal-react` please see our [getting started](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/
|
|
98
|
+
For help getting started with `@azure/msal-react` please see our [getting started](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/v4-lts/lib/msal-react/docs/getting-started.md) doc.
|
|
99
99
|
|
|
100
|
-
Migrating from [react-aad-msal](https://www.npmjs.com/package/react-aad-msal)? Check out our [migration guide](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/
|
|
100
|
+
Migrating from [react-aad-msal](https://www.npmjs.com/package/react-aad-msal)? Check out our [migration guide](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/v4-lts/lib/msal-react/docs/migration-guide.md).
|
|
101
101
|
|
|
102
102
|
### MSAL Basics
|
|
103
103
|
|
|
104
104
|
Since `@azure/msal-react` is a wrapper around `@azure/msal-browser` many docs from the `msal-browser` repo are relevant here as well. For concepts specific to `@azure/msal-react` please see [below](#msal-react-specific-concepts)
|
|
105
105
|
|
|
106
|
-
1. [Initialization](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/
|
|
107
|
-
1. [Acquiring and using an access token](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/
|
|
108
|
-
1. [Managing token lifetimes](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/
|
|
109
|
-
1. [Managing Accounts](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/
|
|
110
|
-
1. [Logging out](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/
|
|
106
|
+
1. [Initialization](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/v4-lts/lib/msal-browser/docs/initialization.md)
|
|
107
|
+
1. [Acquiring and using an access token](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/v4-lts/lib/msal-browser/docs/acquire-token.md)
|
|
108
|
+
1. [Managing token lifetimes](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/v4-lts/lib/msal-browser/docs/token-lifetimes.md)
|
|
109
|
+
1. [Managing Accounts](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/v4-lts/lib/msal-common/docs/Accounts.md)
|
|
110
|
+
1. [Logging out](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/v4-lts/lib/msal-browser/docs/logout.md)
|
|
111
111
|
|
|
112
112
|
### Advanced Topics
|
|
113
113
|
|
|
114
|
-
- [Configuration Options](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/
|
|
115
|
-
- [Request and Response Details](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/
|
|
116
|
-
- [Events](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/
|
|
117
|
-
- [Cache Storage](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/
|
|
118
|
-
- [Performance Enhancements](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/
|
|
114
|
+
- [Configuration Options](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/v4-lts/lib/msal-browser/docs/configuration.md)
|
|
115
|
+
- [Request and Response Details](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/v4-lts/lib/msal-browser/docs/request-response-object.md)
|
|
116
|
+
- [Events](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/v4-lts/lib/msal-browser/docs/events.md)
|
|
117
|
+
- [Cache Storage](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/v4-lts/lib/msal-browser/docs/caching.md)
|
|
118
|
+
- [Performance Enhancements](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/v4-lts/lib/msal-browser/docs/performance.md)
|
|
119
119
|
|
|
120
120
|
### MSAL React Specific Concepts
|
|
121
121
|
|
|
122
|
-
1. [Hooks](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/
|
|
123
|
-
1. [Events](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/
|
|
124
|
-
1. [Class Components](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/
|
|
125
|
-
1. [Performance](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/
|
|
122
|
+
1. [Hooks](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/v4-lts/lib/msal-react/docs/hooks.md)
|
|
123
|
+
1. [Events](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/v4-lts/lib/msal-react/docs/events.md)
|
|
124
|
+
1. [Class Components](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/v4-lts/lib/msal-react/docs/class-components.md)
|
|
125
|
+
1. [Performance](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/v4-lts/lib/msal-react/docs/performance.md)
|
|
126
126
|
|
|
127
127
|
## Samples
|
|
128
128
|
|
|
129
|
-
Our [samples directory](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/
|
|
129
|
+
Our [samples directory](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/v4-lts/samples/msal-react-samples) contains several example apps you can spin up to see how this library can be used in different contexts.
|
|
130
130
|
|
|
131
|
-
- [Create React App (JS) Sample](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/
|
|
132
|
-
- [Create React App (TS) Sample](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/
|
|
133
|
-
- [Next.js Sample](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/
|
|
134
|
-
- [Gatsby Sample](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/
|
|
135
|
-
- [B2C Sample](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/
|
|
131
|
+
- [Create React App (JS) Sample](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/v4-lts/samples/msal-react-samples/react-router-sample)
|
|
132
|
+
- [Create React App (TS) Sample](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/v4-lts/samples/msal-react-samples/typescript-sample)
|
|
133
|
+
- [Next.js Sample](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/v4-lts/samples/msal-react-samples/nextjs-sample)
|
|
134
|
+
- [Gatsby Sample](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/v4-lts/samples/msal-react-samples/gatsby-sample)
|
|
135
|
+
- [B2C Sample](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/v4-lts/samples/msal-react-samples/b2c-sample)
|
|
136
136
|
|
|
137
137
|
More advanced samples backed with a tutorial can be found in the [Azure Samples](https://github.com/Azure-Samples) space on GitHub:
|
|
138
138
|
|
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 v3.0.
|
|
1
|
+
/*! @azure/msal-react v3.0.28 2026-03-13 */
|
|
2
2
|
'use strict';
|
|
3
3
|
import { useState, useRef, useEffect, useCallback } from 'react';
|
|
4
4
|
import { InteractionStatus, InteractionType, EventType, InteractionRequiredAuthError, OIDC_DEFAULT_SCOPES } from '@azure/msal-browser';
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare const name = "@azure/msal-react";
|
|
2
|
-
export declare const version = "3.0.
|
|
2
|
+
export declare const version = "3.0.28";
|
package/dist/packageMetadata.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/*! @azure/msal-react v3.0.
|
|
1
|
+
/*! @azure/msal-react v3.0.28 2026-03-13 */
|
|
2
2
|
'use strict';
|
|
3
3
|
/* eslint-disable header/header */
|
|
4
4
|
const name = "@azure/msal-react";
|
|
5
|
-
const version = "3.0.
|
|
5
|
+
const version = "3.0.28";
|
|
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 v3.0.
|
|
1
|
+
/*! @azure/msal-react v3.0.28 2026-03-13 */
|
|
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 = "3.0.
|
|
107
|
+
const version = "3.0.28";
|
|
108
108
|
|
|
109
109
|
/*
|
|
110
110
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare const name = "@azure/msal-react";
|
|
2
|
-
export declare const version = "3.0.
|
|
2
|
+
export declare const version = "3.0.28";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@azure/msal-react",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.28",
|
|
4
4
|
"author": {
|
|
5
5
|
"name": "Microsoft",
|
|
6
6
|
"email": "nugetaad@microsoft.com",
|
|
@@ -56,11 +56,11 @@
|
|
|
56
56
|
"apiExtractor": "api-extractor run"
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|
|
59
|
-
"@azure/msal-browser": "^4.
|
|
59
|
+
"@azure/msal-browser": "^4.29.1",
|
|
60
60
|
"react": "^16.8.0 || ^17 || ^18 || ^19.2.1"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
|
-
"@azure/msal-browser": "^4.
|
|
63
|
+
"@azure/msal-browser": "^4.29.1",
|
|
64
64
|
"@microsoft/api-extractor": "^7.43.4",
|
|
65
65
|
"@rollup/plugin-typescript": "^11.1.5",
|
|
66
66
|
"@testing-library/jest-dom": "^5.11.5",
|
package/src/packageMetadata.ts
CHANGED