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
@@ -47,6 +47,8 @@ The [`lib`](https://github.com/AzureAD/microsoft-authentication-library-for-js/t
47
47
- Versions in Critical Security Support will only receive fixes for critical security bugs.
48
48
- 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`.
49
49
50
+
> :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, conslut the table in the project [README.md](../../README.md#library-version-support-status).
-[Migrating from Previous MSAL Versions](#migrating-from-previous-msal-versions)
18
21
-[MSAL Basics](#msal-basics)
@@ -27,20 +30,15 @@
27
30
28
31
## About
29
32
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).
31
34
32
35
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).
33
36
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.
35
37
36
38
## FAQ
37
39
38
40
See [here](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-browser/FAQ.md).
39
41
40
-
## Roadmap
41
-
42
-
See [here](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/roadmap.md).
43
-
44
42
## Prerequisites
45
43
46
44
-`@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 +47,30 @@ See [here](https://github.com/AzureAD/microsoft-authentication-library-for-js/bl
49
47
50
48
## Installation
51
49
50
+
### CDN Deprecation
51
+
52
+
> :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, conslut the table in the project [README.md](../../README.md#library-version-support-status).
53
+
52
54
### Via NPM
53
55
54
56
```javascript
55
57
npm install @azure/msal-browser
56
58
```
57
59
60
+
### Via Yarn
61
+
62
+
```javascript
63
+
yarn add @azure/msal-browser
64
+
```
65
+
58
66
## Usage
59
67
60
68
### Migrating from Previous MSAL Versions
61
69
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)
70
+
-[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)
71
+
-[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)
63
72
-[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)
73
+
-[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)
64
74
65
75
### MSAL Basics
66
76
@@ -132,11 +142,9 @@ npm test
132
142
npm run test:coverage
133
143
```
134
144
135
-
## Implicit Flow vs Authorization Code Flow with PKCE
136
-
137
-
`@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`.
145
+
## Authorization Code Flow with Proof Key for Code Exchange
138
146
139
-
### Authorization Code Flow with PKCE
147
+
`@azure/msal-browser` implements the [OAuth 2.0 Authorization Code Flow with PKCE](https://tools.ietf.org/html/rfc7636) for browser-based applications.
140
148
141
149
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:
142
150
@@ -145,28 +153,11 @@ The Authorization Code Flow with Proof Key for Code Exchange (PKCE) is the curre
145
153
-**Refresh Token Support**: Enables long-lived sessions through refresh tokens
146
154
-**OIDC Compliance**: Fully compliant with OpenID Connect standards
147
155
148
-
### Implicit Flow (Deprecated)
149
-
150
-
The Implicit Flow was the previous standard for SPAs but has been deprecated due to security concerns:
151
-
152
-
-**Tokens in URLs**: Access tokens are returned in URL fragments, making them visible in browser history and server logs
153
-
-**No Refresh Tokens**: Implicit flow cannot securely deliver refresh tokens to public clients
154
-
-**Increased Attack Surface**: Tokens are more susceptible to token leakage attacks
155
-
156
-
### Migration Considerations
157
-
158
-
-**`@azure/msal-browser` only supports Authorization Code Flow with PKCE** - Implicit Flow is not supported
159
-
- If you're migrating from `@azure/msal`, `msal` or `adal-angular`, see our [migration guide](./docs/v1-migration.md)
160
-
- Your Azure AD app registration needs to be configured for the Authorization Code Flow
161
-
- Existing applications using Implicit Flow should migrate to Authorization Code Flow for improved security
162
-
163
-
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).
164
-
165
156
## Framework Wrappers
166
157
167
158
If you are using a framework such as Angular or React you may be interested in using one of our wrapper libraries:
0 commit comments