Skip to content

Commit a0eb0c3

Browse files
hectormmgCopilotCopilot
authored
[msal-v5] Update public docs (#8141)
This pull request updates documentation for the Microsoft Authentication Library for JavaScript and its browser package. The main focus is on improving clarity around supported versions, updating branding to "Microsoft Entra ID," and providing guidance on CDN deprecation and migration paths. It also reorganizes and streamlines several sections for easier navigation and understanding. **Branding and terminology updates:** * Changed references from "Azure AD" to "Microsoft Entra ID" throughout the documentation, reflecting Microsoft's latest branding. [[1]](diffhunk://#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5L3-R11) [[2]](diffhunk://#diff-f4b2e8a1ff8fde20345a7d7cc58bd0a841d225493caea83171d8554b0ddc7759L30-L43) **Version support and deprecation guidance:** * Added a new "Library Version Support Status" table to the main `README.md`, clarifying current and LTS versions for all packages and explicitly marking deprecated packages. * Provided clear warnings and instructions about the full deprecation of the `@azure/msal-browser` CDN, advising developers to use package managers instead. [[1]](diffhunk://#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5L30-L56) [[2]](diffhunk://#diff-f4b2e8a1ff8fde20345a7d7cc58bd0a841d225493caea83171d8554b0ddc7759R50-R73) **Installation and migration instructions:** * Expanded installation instructions in `lib/msal-browser/README.md` to include sections for CDN deprecation, NPM, and Yarn, with direct links to migration guides for all major version upgrades. [[1]](diffhunk://#diff-f4b2e8a1ff8fde20345a7d7cc58bd0a841d225493caea83171d8554b0ddc7759R16-R18) [[2]](diffhunk://#diff-f4b2e8a1ff8fde20345a7d7cc58bd0a841d225493caea83171d8554b0ddc7759R50-R73) * Updated migration guide references to cover transitions from v1.x through v5.x for `@azure/msal-browser`. **Documentation structure and clarity improvements:** * Reorganized package descriptions, removed outdated roadmap references, and clarified the relationships between packages and their dependencies. [[1]](diffhunk://#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5L30-L56) [[2]](diffhunk://#diff-f4b2e8a1ff8fde20345a7d7cc58bd0a841d225493caea83171d8554b0ddc7759L30-L43) * Streamlined the explanation of authentication flows, removing deprecated implicit flow details and focusing on Authorization Code Flow with PKCE. [[1]](diffhunk://#diff-f4b2e8a1ff8fde20345a7d7cc58bd0a841d225493caea83171d8554b0ddc7759L135-R147) [[2]](diffhunk://#diff-f4b2e8a1ff8fde20345a7d7cc58bd0a841d225493caea83171d8554b0ddc7759L148-R160) --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
1 parent a6690f1 commit a0eb0c3

File tree

12 files changed

+58
-353
lines changed

12 files changed

+58
-353
lines changed

README.md

Lines changed: 25 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
# Microsoft Authentication Library for JavaScript (MSAL.js)
22

3-
The Microsoft Authentication Library for JavaScript enables both client-side and server-side JavaScript applications to authenticate users using [Azure AD](https://docs.microsoft.com/azure/active-directory/develop/v2-overview) for 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).
3+
The Microsoft Authentication Library for JavaScript enables both client-side and server-side JavaScript applications to authenticate users using [Microsoft Entra ID](https://docs.microsoft.com/azure/active-directory/develop/v2-overview) for work and school accounts, 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).
44

55
## Repository
66

77
### Core, wrapper and extensions libraries
88

99
The [`lib`](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib) folder contains the source code for our libraries in active development. You will also find all the details about **installing the libraries** in their respective README.md.
1010

11+
- [Microsoft Authentication Library for JavaScript](lib/msal-browser/): A browser-based, framework-agnostic browser library that enables authentication and token acquisition with the Microsoft Identity platform in JavaScript applications. Implements the OAuth 2.0 [Authorization Code Flow with PKCE](https://docs.microsoft.com/azure/active-directory/develop/v2-oauth2-auth-code-flow), and is [OpenID-compliant](https://docs.microsoft.com/azure/active-directory/develop/v2-protocols-oidc).
12+
1113
- [Microsoft Authentication Library for Node.js](lib/msal-node/): A [Node.js](https://nodejs.org/en/) library that enables authentication and token acquisition with the Microsoft Identity platform in JavaScript applications. Implements the following OAuth 2.0 protocols and is [OpenID-compliant](https://docs.microsoft.com/azure/active-directory/develop/v2-protocols-oidc):
1214

1315
- [Authorization Code Grant](https://oauth.net/2/grant-types/authorization-code/) with [PKCE](https://oauth.net/2/pkce/)
@@ -17,7 +19,6 @@ The [`lib`](https://github.com/AzureAD/microsoft-authentication-library-for-js/t
1719
- [Silent Flow](https://docs.microsoft.com/azure/active-directory/develop/msal-acquire-cache-tokens#acquiring-tokens-silently-from-the-cache)
1820
- [On-behalf-of Flow](https://learn.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-on-behalf-of-flow)
1921

20-
- [Microsoft Authentication Library for JavaScript](lib/msal-browser/): A browser-based, framework-agnostic browser library that enables authentication and token acquisition with the Microsoft Identity platform in JavaScript applications. Implements the OAuth 2.0 [Authorization Code Flow with PKCE](https://docs.microsoft.com/azure/active-directory/develop/v2-oauth2-auth-code-flow), and is [OpenID-compliant](https://docs.microsoft.com/azure/active-directory/develop/v2-protocols-oidc).
2122

2223
- [Native Authentication Support for JavaScript](lib/msal-browser/src/custom_auth/): MSAL also provides native authentication APIs that allow applications to implement a native experience with end-to-end customizable flows in their applications. With native authentication, users are guided through a rich, native, sign-up and sign-in journey without leaving the app. The native authentication feature is available for SPAs on [External ID for customers](https://learn.microsoft.com/en-us/entra/identity-platform/concept-native-authentication). It is recommended to always use the most up-to-date version of the SDK.
2324

@@ -27,33 +28,43 @@ The [`lib`](https://github.com/AzureAD/microsoft-authentication-library-for-js/t
2728
- [Microsoft Authentication Library for Angular](lib/msal-angular/): A wrapper of the msal-browser library for apps using Angular framework.
2829
- [Microsoft Authentication Extensions for Node](extensions/msal-node-extensions/): The Microsoft Authentication Extensions for Node offers secure mechanisms for client applications to perform cross-platform token cache serialization and persistence. It gives additional support to the Microsoft Authentication Library for Node (MSAL).
2930

30-
### Libraries in Long-term Support (LTS)
31+
### Library Version Support Status
32+
33+
34+
| Package Name | Current Version | LTS Version |
35+
|--------------|-----------------|-------------|
36+
| @azure/msal-browser |v5 | v4 |
37+
| @azure/msal-node | v5 | v3 |
38+
| @azure/msal-react | v5 | v3 |
39+
| @azure/msal-angular | v5 | v4 |
40+
| @azure/msal-node-extensions | v5 | v1 |
41+
| ~~@azure/msal (msal-core)~~| | Fully Deprecated |
42+
| ~~@azure/msal-angularjs~~ | | Fully Deprecated |
3143

32-
The following libraries, hosted on the `msal-lts` branch, are no longer in active development, but they are still receiving critical security bug fix support.
44+
**Disambiguation:**
45+
- The MSAL team provides full support to the current version for each package in the table below.
46+
- LTS (long-term support) versions will still receive some support and critical bug-fixes but will not ship new features. Our recommendation if you encounter any issues will always be to upgrade to the latest version of the library.
47+
- All supported packages were brought up to version parity as of `v5`. Packages with versions lower than `v4` in the LTS column skipped as many versions as required to jump directly to `v5`.
48+
49+
#### MSAL Browser CDN Deprecation
50+
51+
> :warning: The `@azure/msal-browser` CDN has been fully deprecated as of `@azure/msal-browser@3.0.0` and is no longer supported. App developers using the MSAL CDN must upgrade to the latest possible version and consume MSAL through a package manager or bundling tool of their choice. For more information on version support, consult the table above.
3352
34-
- [Microsoft Authentication Library for JavaScript v2.x](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/msal-lts/lib/msal-browser)
35-
- [Microsoft Authentication Library for Node.js v1.x](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/msal-lts/lib/msal-node)
36-
- [Microsoft Authentication Library for React v1.x](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/msal-lts/lib/msal-react)
37-
- [Microsoft Authentication Library for Angular v2.x](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/msal-lts/lib/msal-angular)
3853

3954
### Package Structure
4055

41-
We ship a number of different packages which are meant for different platforms. You can see the relationship between packages and different authentication flows they implement below.
56+
We ship a number of different packages which are meant for different platforms. You can see the relationship between packages and their dependencies below.
4257

4358
![Package Structure](docs/diagrams/png/PackageStructure.png)
4459

4560
### Samples
4661

47-
The [`samples`](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/samples) folder contains sample applications for our libraries. A complete list of samples can be found in the respective package folders or [on our wiki](https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/Samples).
62+
The [`samples`](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/samples) folder contains sample applications for our libraries. A complete list of samples can be found in the respective package folders.
4863

4964
## Package versioning
5065

5166
All of our libraries follow [semantic versioning](https://semver.org). We recommend using the latest version of each library to ensure you have the latest security patches and bug fixes.
5267

53-
## Roadmap
54-
55-
Please check the [roadmap](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/roadmap.md) to see what we are working on and what we have planned for future releases.
56-
5768
## Community Help and Support
5869

5970
- [GitHub Issues](../../issues) is the best place to ask questions, report bugs, and new request features.

SECURITY.md

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,5 @@
11
# Security Policy
22

3-
## Supported Versions
4-
5-
The following versions of our libraries are receiving security updates:
6-
7-
| Version | Supported |
8-
| ------- | ------------------ |
9-
| `@azure/msal-browser@2.x.x` | :white_check_mark: |
10-
| `msal@1.x.x` | :white_check_mark: |
11-
| `msal@0.x.x` | :x: |
12-
| `@azure/msal-angular@2.x.x` | :white_check_mark: |
13-
| `@azure/msal-angular@1.x.x` | :white_check_mark: |
14-
| `@azure/msal-angular@0.x.x` | :x: |
15-
| `@azure/msal-angularjs@0.1.x` | :white_check_mark: |
16-
| `@azure/msal-react@1.x.x` | :white_check_mark: |
17-
| `@azure/msal-node@1.x.x` | :white_check_mark: |
18-
193
## Reporting a Vulnerability
204

215
If you find a security issue with our libraries or services [please report it to the Microsoft Security Response Center (MSRC)](https://aka.ms/report-security-issue) with as much detail as possible. Your submission may be eligible for a bounty through the [Microsoft Bounty](http://aka.ms/bugbounty) program. Please do not post security issues to GitHub Issues or any other public site. We will contact you shortly upon receiving the information. We encourage you to get notifications of when security incidents occur by visiting [this page](https://www.microsoft.com/msrc/technical-security-notifications) and subscribing to Security Advisory Alerts.
-2.42 KB
Loading

lib/msal-browser/README.md

Lines changed: 24 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
1. [Roadmap](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/roadmap.md)
1414
1. [Prerequisites](#prerequisites)
1515
1. [Installation](#installation)
16+
- [CDN Deprecation](#cdn-deprecation)
17+
- [Via npm](#via-npm)
18+
- [Via Yarn](#via-yarn)
1619
1. [Usage](#usage)
1720
- [Migrating from Previous MSAL Versions](#migrating-from-previous-msal-versions)
1821
- [MSAL Basics](#msal-basics)
@@ -27,20 +30,17 @@
2730

2831
## About
2932

30-
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).
33+
The MSAL library for JavaScript enables client-side JavaScript applications to authenticate users using [Microsoft Entra ID](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).
3134

3235
The `@azure/msal-browser` package described by the code in this folder uses the [`@azure/msal-common` package](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-common) as a 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 [below](#implicit-flow-vs-authorization-code-flow-with-pkce).
3336

34-
This is an improvement upon the previous `@azure/msal` library which will utilize the authorization code flow in the browser. Most features available in the old library will be available in this one, but there are nuances to the authentication flow in both. The `@azure/msal-browser` package does NOT support the implicit flow.
37+
The `@azure/msal-browser` package **does NOT** support the implicit flow.
38+
3539

3640
## FAQ
3741

3842
See [here](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-browser/FAQ.md).
3943

40-
## Roadmap
41-
42-
See [here](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/roadmap.md).
43-
4444
## Prerequisites
4545

4646
- `@azure/msal-browser` is meant to be used in [Single-Page Application scenarios](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-overview).
@@ -49,18 +49,32 @@ See [here](https://github.com/AzureAD/microsoft-authentication-library-for-js/bl
4949

5050
## Installation
5151

52+
### CDN Deprecation
53+
54+
> :warning: The `@azure/msal-browser` CDN has been fully deprecated as of `@azure/msal-browser@3.0.0` and is no longer supported. App developers using the MSAL CDN must upgrade to the latest possible version and consume MSAL through a package manager or bundling tool of their choice. For more information on version support, consult the table in the project [README.md](../../README.md#library-version-support-status).
55+
5256
### Via NPM
5357

5458
```javascript
5559
npm install @azure/msal-browser
5660
```
5761

62+
### Via Yarn
63+
64+
```javascript
65+
yarn add @azure/msal-browser
66+
```
67+
5868
## Usage
5969

6070
### Migrating from Previous MSAL Versions
6171

62-
- [Migrating from MSAL v1.x to MSAL v2.x](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-browser/docs/v1-migration.md)
72+
Select the guide that matches your current MSAL version:
73+
74+
- [Migrating from MSAL v4.x to MSAL v5.x](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-browser/docs/v4-migration.md)
75+
- [Migrating from MSAL v3.x to MSAL v4.x](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-browser/docs/v3-migration.md)
6376
- [Migrating from MSAL v2.x to MSAL v3.x](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-browser/docs/v2-migration.md)
77+
- [Migrating from MSAL v1.x to MSAL v2.x](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-browser/docs/v1-migration.md)
6478

6579
### MSAL Basics
6680

@@ -131,11 +145,9 @@ npm test
131145
npm run test:coverage
132146
```
133147

134-
## Implicit Flow vs Authorization Code Flow with PKCE
135-
136-
`@azure/msal-browser` implements the [OAuth 2.0 Authorization Code Flow with PKCE](https://tools.ietf.org/html/rfc7636) for browser-based applications. This is a significant improvement over the Implicit Flow that was used in `@azure/msal`, `msal` or `adal-angular`.
148+
## Authorization Code Flow with Proof Key for Code Exchange (PKCE)
137149

138-
### Authorization Code Flow with PKCE
150+
`@azure/msal-browser` implements the [OAuth 2.0 Authorization Code Flow with PKCE](https://tools.ietf.org/html/rfc7636) for browser-based applications.
139151

140152
The Authorization Code Flow with Proof Key for Code Exchange (PKCE) is the current industry standard for securing OAuth 2.0 authorization in public clients, including single-page applications (SPAs). Key benefits include:
141153

@@ -144,28 +156,11 @@ The Authorization Code Flow with Proof Key for Code Exchange (PKCE) is the curre
144156
- **Refresh Token Support**: Enables long-lived sessions through refresh tokens
145157
- **OIDC Compliance**: Fully compliant with OpenID Connect standards
146158

147-
### Implicit Flow (Deprecated)
148-
149-
The Implicit Flow was the previous standard for SPAs but has been deprecated due to security concerns:
150-
151-
- **Tokens in URLs**: Access tokens are returned in URL fragments, making them visible in browser history and server logs
152-
- **No Refresh Tokens**: Implicit flow cannot securely deliver refresh tokens to public clients
153-
- **Increased Attack Surface**: Tokens are more susceptible to token leakage attacks
154-
155-
### Migration Considerations
156-
157-
- **`@azure/msal-browser` only supports Authorization Code Flow with PKCE** - Implicit Flow is not supported
158-
- If you're migrating from `@azure/msal`, `msal` or `adal-angular`, see our [migration guide](./docs/v1-migration.md)
159-
- Your Azure AD app registration needs to be configured for the Authorization Code Flow
160-
- Existing applications using Implicit Flow should migrate to Authorization Code Flow for improved security
161-
162-
For more technical details about these flows, refer to the [Microsoft identity platform documentation](https://docs.microsoft.com/azure/active-directory/develop/v2-oauth2-auth-code-flow).
163-
164159
## Framework Wrappers
165160

166161
If you are using a framework such as Angular or React you may be interested in using one of our wrapper libraries:
167162

168-
- Angular: [@azure/msal-angular v2](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-angular)
163+
- Angular: [@azure/msal-angular](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-angular)
169164
- React: [@azure/msal-react](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-react)
170165

171166
## Security Reporting

0 commit comments

Comments
 (0)