@azure/msal-angular 3.0.0-beta.0 → 3.0.0

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.
Files changed (87) hide show
  1. package/.beachballrc +3 -0
  2. package/.editorconfig +16 -0
  3. package/CHANGELOG.json +1418 -0
  4. package/CHANGELOG.md +520 -0
  5. package/FAQ.md +175 -0
  6. package/LICENSE +20 -20
  7. package/README.md +157 -157
  8. package/angular.json +51 -0
  9. package/docs/angular-universal.md +60 -0
  10. package/docs/configuration.md +525 -0
  11. package/docs/errors.md +89 -0
  12. package/docs/events.md +262 -0
  13. package/docs/initialization.md +206 -0
  14. package/docs/known-issues.md +19 -0
  15. package/docs/logging.md +47 -0
  16. package/docs/msal-guard.md +208 -0
  17. package/docs/msal-interceptor.md +160 -0
  18. package/docs/multi-tenant.md +90 -0
  19. package/docs/performance.md +50 -0
  20. package/docs/public-apis.md +29 -0
  21. package/docs/redirects.md +214 -0
  22. package/docs/security.md +4 -0
  23. package/docs/ssosilent.md +84 -0
  24. package/docs/v0-v1-upgrade-guide.md +61 -0
  25. package/docs/v1-v2-upgrade-guide.md +70 -0
  26. package/docs/v2-v3-upgrade-guide.md +41 -0
  27. package/karma.conf.js +43 -0
  28. package/ng-package.json +7 -0
  29. package/package.json +55 -31
  30. package/src/IMsalService.ts +31 -0
  31. package/src/constants.ts +20 -0
  32. package/src/msal.broadcast.config.ts +8 -0
  33. package/src/msal.broadcast.service.spec.ts +456 -0
  34. package/src/msal.broadcast.service.ts +74 -0
  35. package/src/msal.guard.config.ts +27 -0
  36. package/src/msal.guard.spec.ts +525 -0
  37. package/src/msal.guard.ts +290 -0
  38. package/src/msal.interceptor.config.ts +44 -0
  39. package/src/msal.interceptor.spec.ts +1125 -0
  40. package/src/msal.interceptor.ts +390 -0
  41. package/src/msal.module.ts +51 -0
  42. package/src/msal.navigation.client.spec.ts +95 -0
  43. package/src/msal.navigation.client.ts +57 -0
  44. package/src/msal.redirect.component.spec.ts +63 -0
  45. package/src/msal.redirect.component.ts +26 -0
  46. package/src/msal.service.spec.ts +452 -0
  47. package/src/msal.service.ts +97 -0
  48. package/src/packageMetadata.ts +3 -0
  49. package/{public-api.d.ts → src/public-api.ts} +35 -17
  50. package/src/test.ts +19 -0
  51. package/tsconfig.json +25 -0
  52. package/tsconfig.lib.json +27 -0
  53. package/tsconfig.lib.prod.json +10 -0
  54. package/tsconfig.spec.json +17 -0
  55. package/IMsalService.d.ts +0 -15
  56. package/constants.d.ts +0 -5
  57. package/esm2020/IMsalService.mjs +0 -6
  58. package/esm2020/azure-msal-angular.mjs +0 -5
  59. package/esm2020/constants.mjs +0 -10
  60. package/esm2020/msal.broadcast.config.mjs +0 -6
  61. package/esm2020/msal.broadcast.service.mjs +0 -57
  62. package/esm2020/msal.guard.config.mjs +0 -6
  63. package/esm2020/msal.guard.mjs +0 -218
  64. package/esm2020/msal.interceptor.config.mjs +0 -6
  65. package/esm2020/msal.interceptor.mjs +0 -270
  66. package/esm2020/msal.module.mjs +0 -46
  67. package/esm2020/msal.navigation.client.mjs +0 -51
  68. package/esm2020/msal.redirect.component.mjs +0 -31
  69. package/esm2020/msal.service.mjs +0 -81
  70. package/esm2020/packageMetadata.mjs +0 -4
  71. package/esm2020/public-api.mjs +0 -18
  72. package/fesm2015/azure-msal-angular.mjs +0 -736
  73. package/fesm2015/azure-msal-angular.mjs.map +0 -1
  74. package/fesm2020/azure-msal-angular.mjs +0 -732
  75. package/fesm2020/azure-msal-angular.mjs.map +0 -1
  76. package/index.d.ts +0 -5
  77. package/msal.broadcast.config.d.ts +0 -3
  78. package/msal.broadcast.service.d.ts +0 -17
  79. package/msal.guard.config.d.ts +0 -9
  80. package/msal.guard.d.ts +0 -43
  81. package/msal.interceptor.config.d.ts +0 -17
  82. package/msal.interceptor.d.ts +0 -63
  83. package/msal.module.d.ts +0 -13
  84. package/msal.navigation.client.d.ts +0 -19
  85. package/msal.redirect.component.d.ts +0 -15
  86. package/msal.service.d.ts +0 -31
  87. package/packageMetadata.d.ts +0 -2
package/FAQ.md ADDED
@@ -0,0 +1,175 @@
1
+ # MSAL Angular FAQ
2
+
3
+ ***
4
+ **[Compatibility](#compatibility)**
5
+
6
+ 1. [What browsers are supported?](#what-browsers-are-supported)
7
+ 1. [What versions of Angular are supported?](#what-versions-of-angular-are-supported)
8
+ 1. [Does `@azure/msal-angular` support Server Side Rendering?](#does-azuremsal-angular-support-server-side-rendering)
9
+ 1. [Can `@azure/msal-angular` be used with Internet Explorer?](#can-azuremsal-angular-be-used-with-internet-explorer)
10
+ 1. [Can `@azure/msal-angular` be used with Microsoft Graph JavaScript SDK?](#can-azuremsal-angular-be-used-with-microsoft-graph-javascript-sdk)
11
+
12
+ **[Configuration](#configuration)**
13
+
14
+ 1. [What is the difference between `@azure/msal-angular` v3 and v2?](#what-is-the-difference-between-azuremsal-angular-v3-and-v2)
15
+ 1. [What is the difference between `@azure/msal-angular` v2 and v1?](#what-is-the-difference-between-azuremsal-angular-v2-and-v1)
16
+ 1. [How do I add tokens to API calls?](#how-do-i-add-tokens-to-api-calls)
17
+ 1. [How do I use my app with path/hash location strategy?](#how-do-i-use-my-app-with-pathhash-location-strategy)
18
+ 1. [How do I make sure all events are available when using path location strategy?](#how-do-i-make-sure-all-events-are-available-when-using-path-location-strategy)
19
+
20
+ **[Authentication](#authentication)**
21
+
22
+ 1. [How do I log users in when they hit the application?](#how-do-i-log-users-in-when-they-hit-the-application)
23
+ 1. [Why is my app looping when logging in with redirect?](#why-is-my-app-looping-when-logging-in-with-redirect)
24
+ 1. [How do I implement self-service sign-up?](#how-do-i-implement-self-service-sign-up)
25
+
26
+ **[Usage](#usage)**
27
+
28
+ 1. [How do I secure routes?](#how-do-i-secure-routes)
29
+ 1. [How do I get accounts?](#how-do-i-get-accounts)
30
+ 1. [How do I get and set active accounts?](#how-do-i-get-and-set-active-accounts)
31
+
32
+ **[Errors](#errors)**
33
+
34
+ **[What if my question has not been answered?](#what-if-my-question-has-not-been-answered)**
35
+
36
+ ***
37
+
38
+ ## Compatibility
39
+
40
+ ### What browsers are supported?
41
+
42
+ Please see [here](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-browser/FAQ.md#what-browsers-are-supported-by-msaljs) for supported browsers.
43
+
44
+ ### What versions of Angular are supported?
45
+
46
+ MSAL Angular v3 is in alpha and currently supports Angular 15 and 16.
47
+
48
+ MSAL Angular v2 supports Angular 9, 10, 11, 12, 13 and 14.
49
+
50
+ ### Does `@azure/msal-angular` support Server Side Rendering?
51
+
52
+ Yes, server side rendering is supported through Angular universal. See our doc [here](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-angular/docs/angular-universal.md) for more information.
53
+
54
+ ### Can `@azure/msal-angular` be used with Internet Explorer?
55
+
56
+ MSAL Angular v3 no longer supports Internet Explorer.
57
+
58
+ MSAL Angular v2 and earlier supports IE 11. More information on configuration can be found [here](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/msal-lts/lib/msal-angular/docs/v2-docs/ie-support.md).
59
+
60
+ ## Can `@azure/msal-angular` be used with Microsoft Graph JavaScript SDK?
61
+
62
+ Yes, `@azure/msal-angular` can be used as a custom authentication provider for the [Microsoft Graph JavaScript SDK](https://github.com/microsoftgraph/msgraph-sdk-javascript). For an implementation, please refer to the sample: [Angular SPA calling Graph API](https://github.com/Azure-Samples/ms-identity-javascript-angular-tutorial/tree/main/2-Authorization-I/1-call-graph).
63
+
64
+ ## Configuration
65
+
66
+ ### What is the difference between `@azure/msal-angular` v3 and v2?
67
+
68
+ Please see our [v2 to v3 upgrade guide](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-angular/docs/v2-v3-upgrade-guide.md) for information on the differences between `@azure/msal-angular` v3 and v2, as well as changes to watch out for when upgrading.
69
+
70
+ Note that MSAL Angular v3 is currently in alpha and additional features and bug fixes will be added.
71
+
72
+ ### What is the difference between `@azure/msal-angular` v2 and v1?
73
+
74
+ Please see our [v1 to v2 upgrade guide](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-angular/docs/v1-v2-upgrade-guide.md) for information on the differences between `@azure/msal-angular` v1 and v2, as well as changes to watch out for when upgrading.
75
+
76
+ ### How do I add tokens to API calls?
77
+
78
+ `@azure/msal-angular` provides the `MsalInterceptor` for obtaining tokens and adding them to HTTP requests. You may find the following links helpful:
79
+
80
+ * [MsalInterceptor doc](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-angular/docs/msal-interceptor.md) for details on configuration and use
81
+ * [Initialization doc](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-angular/docs/initialization.md#get-tokens-for-web-api-calls) for basic set up
82
+ * [Configuration doc](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-angular/docs/configuration.md) for different ways to configure MSAL
83
+ * [Samples](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/samples/msal-angular-v3-samples/angular15-sample-app/src/app/app.module.ts#L52) for examples of usage
84
+
85
+ Please note that the `MsalInterceptor` is optional. You may wish to explicitly acquire tokens using the acquireToken APIs instead. The `MsalInterceptor` is provided for your convenience and may not fit all use cases. We encourage you to write your own interceptor if you have specific needs that are not addressed by the `MsalInterceptor`.
86
+
87
+ ### How do I use my app with path/hash location strategy?
88
+
89
+ `@azure/msal-angular` supports both the `PathLocationStrategy` and `HashLocationStrategy`, which can be configured in the `app-routing.module.ts` of your app. See our [samples list](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/msal-lts/samples/msal-angular-v3-samples) for the routing strategy demonstrated by each sample. See the [Angular docs](https://angular.io/guide/router#locationstrategy-and-browser-url-styles) for more details on routing strategies.
90
+
91
+ See [below](#how-do-i-log-users-in-when-they-hit-the-application) for additional considerations for each strategy if you are wanting to log users in on page load.
92
+
93
+ ### How do I make sure all events are available when using path location strategy?
94
+
95
+ There are certain situations where events emitted before a redirect are not able to be subscribed to after the redirect to a new page when using the path location strategy. An example is where an error thrown is caught by the `MsalGuard`, but the error event is not available to be subscribed to once the `MsalGuard` redirects to a `login-failed` route.
96
+
97
+ The `MsalBroadcastService` has optional configurations which allow the replay of past events. This can be set to replay a number of past events, such as the events before a redirect, when subscribed to on a new page load. See our [Events documentation](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-angular/docs/events.md#optional-msalbroadcastservice-configurations) for configuration details.
98
+
99
+ ## Authentication
100
+
101
+ ### How do I log users in when they hit the application?
102
+
103
+ To log your users in when they hit the application, without using a login button, **do not** call `login` in the `ngOnInit` in `app.component.ts`, as this can cause looping with redirects. Instead, we recommend setting the `MsalGuard` on your initial page, which will prompt users to log in before they reach other pages in your application. Our additional recommendations depend on your routing strategy below. Please all see our [MsalGuard doc](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-angular/docs/msal-guard.md) for more information.
104
+
105
+ #### PathLocationStrategy
106
+
107
+ For those using the `PathLocationStrategy`, we recommend:
108
+ - Setting the `MsalGuard` on your initial page
109
+ - Set your `redirectUri` to `'http://localhost:4200/auth'`
110
+ - Adding an `'auth'` path to your routes, setting the `MsalRedirectComponent` as the component (this route should not be protected by the `MsalGuard`)
111
+ - Making sure the `MsalRedirectComponent` is bootstrapped
112
+ - Optionally: adding `MsalGuard` to all your routes if you want all your routes protected
113
+
114
+ Our [Angular 15 sample](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/samples/msal-angular-v3-samples/angular15-sample-app) demonstrates use of the `PathLocationStrategy`.
115
+
116
+ #### HashLocationStrategy
117
+
118
+ For those using the `HashLocationStrategy`, we recommend:
119
+ - Setting the `MsalGuard` on your initial page
120
+ - Not setting the `MsalGuard` on placeholder routes (e.g. `/code`, `/error`)
121
+ - Making sure the `MsalRedirectComponent` is bootstrapped
122
+ - Optionally: adding `MsalGuard` to all your routes if you want all your routes protected
123
+
124
+ Our older [Angular 11 sample](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/msal-lts/samples/msal-angular-v2-samples/angular11-sample-app/src/app/app-routing.module.ts) demonstrates how to protect routes with `MsalGuard` and the hash location strategy.
125
+
126
+ ### Why is my app looping when logging in with redirect?
127
+
128
+ One of the common reasons your app may be looping while logging in with redirects is due to improper usage of the `loginRedirect()` API. We recommend that you do not call `loginRedirect()` in the `ngOnInit` in the `app.component.ts`, as this will attempt to log in with every page load, often before any redirect has finished processing.
129
+
130
+ Redirects **must** be handled either with the `MsalRedirectComponent` or with calling `handleRedirectObservable()`. See our docs on redirects [here](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-angular/docs/redirects.md) for more information. Additionally, any interaction or account validation should be done after subscribing to the `inProgress$` observable of `MsalBroadcastService` and filtering for `InteractionStatus.None`. Please see our [sample](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/samples/msal-angular-v3-samples/angular15-sample-app/src/app/app.component.ts#L43) for an example.
131
+
132
+ ## How do I implement self-service sign-up?
133
+ MSAL Angular supports self-service sign-up in the auth code flow. Please see our docs [here](https://azuread.github.io/microsoft-authentication-library-for-js/ref/modules/_azure_msal_browser.html#popuprequest) for supported prompt values in the request and their expected outcomes, and [here](http://aka.ms/s3u) for an overview of self-service sign-up and configuration changes that need to be made to your Azure tenant. Please note that that self-service sign-up is not available in B2C and test environments.
134
+
135
+ ## Usage
136
+
137
+ ### How do I secure routes?
138
+
139
+ Please see our [MsalGuard doc](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-angular/docs/msal-guard.md) for more information about securing routes with the `MsalGuard`.
140
+
141
+ ### How do I get accounts?
142
+
143
+ The `@azure/msal-browser` instance used by `@azure/msal-angular` exposes multiple methods for getting account information. We recommend using `getAllAccounts()` to get all accounts, and `getAccountByHomeId()` and `getAccountByLocalId()` to get specific accounts. Note that while `getAccountByUsername()` is available, it should be a secondary choice, as it may be less reliable and is for convenience only. See the [`@azure/msal-browser` docs](https://azuread.github.io/microsoft-authentication-library-for-js/ref/classes/_azure_msal_browser.publicclientapplication.html) for more details on account methods.
144
+
145
+ We recommend subscribing to the `inProgress$` observable of `MsalBroadcastService` and filtering for `InteractionStatus.None` before retrieving account information. This ensures that all interactions have completed before getting account information. See [our sample](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/samples/msal-angular-v3-samples/angular15-sample-app/src/app/app.component.ts#L45) for an example of this use.
146
+
147
+ ### How do I get and set active accounts?
148
+
149
+ The `msal-browser` instance exposes `getActiveAccount()` and `setActiveAccount()` for active accounts.
150
+
151
+ We recommend subscribing to the `inProgress$` observable of `MsalBroadcastService` and filtering for `InteractionStatus.None` before retrieving account information with `getActiveAccount()`. This ensures that all interactions have completed before getting account information.
152
+
153
+ We recommend setting the active account:
154
+
155
+ - After any action that may change the account, especially if your app uses multiple accounts. See [here](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/samples/msal-angular-v3-samples/angular15-sample-app/src/app/home/home.component.ts#L24) for an example of setting the account after a successful login.
156
+ - On initial page load. Wait until all interactions are complete (by subscribing to the `inProgress$` observable of `MsalBroadcastService` and filtering for `InteractionStatus.None`), check if there is an active account, and if there is none, set the active account. This could be the first account retrieved by `getAllAccounts()`, or other account selection logic required by your app. See [here](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/samples/msal-angular-v3-samples/angular15-sample-app/src/app/app.component.ts#L43) for an example of checking and setting the active account on page load.
157
+
158
+ **Note:** Prior to `@azure/msal-browser@2.16.0` active account did not persist across page loads. If you are using `@azure/msal-browser@2.15.0` or earlier we recommend that you set the active account for each page load. In version 2.16.0 and above the active account will be cached in the cache location specified in your MSAL config and retrieved each time `getActiveAccount` is called.
159
+
160
+ Our [Angular 15](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/samples/msal-angular-v3-samples/angular15-sample-app) sample demonstrates basic usage. Your app may require more complicated logic to choose accounts.
161
+
162
+ ## Errors
163
+
164
+ If you have questions about specific errors you are receiving please see the following documents detailing some of the common errors:
165
+
166
+ - [`@azure/msal-browser` error doc](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-browser/docs/errors.md)
167
+ - [`@azure/msal-angular` error doc](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-angular/docs/errors.md)
168
+
169
+ ## What if my question has not been answered?
170
+
171
+ First check the `@azure/msal-browser` [FAQ](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-browser/FAQ.md) to see if your question is answered there. Since `@azure/msal-angular` is a wrapper around `@azure/msal-browser` many questions you may have are answered there.
172
+
173
+ If you have questions about our roadmap you can find a high level overview of planned features and releases [here](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/roadmap.md).
174
+
175
+ If your question is not answered in this document or in the `@azure/msal-browser` FAQ you can [open an issue](https://github.com/AzureAD/microsoft-authentication-library-for-js/issues/new/choose) and we will answer it as soon as we can.
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) Microsoft Corporation. All rights reserved.
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1
+ MIT License
2
+
3
+ Copyright (c) Microsoft Corporation. All rights reserved.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
21
  SOFTWARE
package/README.md CHANGED
@@ -1,158 +1,158 @@
1
- # Microsoft Authentication Library for Angular
2
-
3
- ![npm (scoped)](https://img.shields.io/npm/v/@azure/msal-angular)
4
- ![npm](https://img.shields.io/npm/dw/@azure/msal-angular)
5
- [![codecov](https://codecov.io/gh/AzureAD/microsoft-authentication-library-for-js/branch/dev/graph/badge.svg?flag=msal-angular)](https://codecov.io/gh/AzureAD/microsoft-authentication-library-for-js)
6
-
7
- | <a href="https://docs.microsoft.com/azure/active-directory/develop/tutorial-v2-angular-auth-code" 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_angular.html" target="_blank">Library Reference</a> | [Support](README.md#community-help-and-support) | <a href="https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/samples/msal-angular-v3-samples" target="blank">Samples</a>
8
- | --- | --- | --- | --- | --- |
9
-
10
- 1. [About](#about)
11
- 1. [Guides](#guides)
12
- 1. [FAQ](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-angular/FAQ.md)
13
- 1. [Changelog](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-angular/CHANGELOG.md)
14
- 1. [Version Support](#version-support)
15
- 1. [Prerequisites](#prerequisites)
16
- 1. [Installation](#installation)
17
- 1. [Usage](#usage)
18
- 1. [Samples](#samples)
19
- 1. [Build and running tests](#build-and-running-tests)
20
- 1. [Versioning](#versioning)
21
- 1. [Community Help and Support](#community-help-and-support)
22
- 1. [Contribute](#contribute)
23
- 1. [Security Reporting](#security-reporting)
24
- 1. [License](#license)
25
- 1. [Code of Conduct](#we-value-and-adhere-to-the-microsoft-open-source-code-of-conduct)
26
-
27
- ## About
28
-
29
- MSAL for Angular enables Angular web 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
-
31
- The `@azure/msal-angular` package described by the code in this folder wraps the [`@azure/msal-browser` package](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-browser) and uses it as a peer dependency to enable authentication in Angular Web 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 description provided by [@azure/msal-browser](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-browser#implicit-flow-vs-authorization-code-flow-with-pkce). If you are looking for the version of the library that uses the implicit flow, please see the [MSAL Angular v1 library](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/msal-angular-v1/lib/msal-angular).
32
-
33
- The current `@azure/msal-angular` library improves upon the previous version and utilizes the authorization code flow. Most features available in the old library will be available in this one, but there are nuances to the authentication flow in both. The latest `@azure/msal-angular` package does NOT support the implicit flow.
34
-
35
- ## Guides
36
-
37
- - [Upgrade Guide (v2-v3)](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-angular/docs/v2-v3-upgrade-guide.md)
38
- - [Upgrade Guide (v1-v2)](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-angular/docs/v1-v2-upgrade-guide.md)
39
- - [Upgrade Guide (v0-v1)](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-angular/docs/v0-v1-upgrade-guide.md)
40
- - [Configuration](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-angular/docs/configuration.md)
41
-
42
- ## Version Support
43
-
44
- At a minimum, `@azure/msal-angular` will follow the [support schedule of the main Angular project](https://angular.io/guide/releases#support-policy-and-schedule). We may continue to support certain versions of Angular that are not under Active or LTS support from the main Angular project on a version-by-version basis, as defined below.
45
-
46
- | MSAL Angular version | MSAL support status | Supported Angular versions |
47
- |----------------------|-------------------------|----------------------------|
48
- | MSAL Angular v3-alpha | Active development | 15, 16 |
49
- | MSAL Angular v2 | In maintenance | 9, 10, 11, 12, 13, 14 |
50
- | MSAL Angular v1 | In maintenance | 6, 7, 8, 9 |
51
- | MSAL Angular v0 | Out of support | 4, 5 |
52
-
53
- ## Prerequisites
54
-
55
- Before using `@azure/msal-angular`, [register an application in Azure AD](https://docs.microsoft.com/azure/active-directory/develop/quickstart-register-app) to get your `clientId`.
56
-
57
- ## Installation
58
-
59
- The `@azure/msal-angular` package is available on NPM:
60
- ```
61
- npm install @azure/msal-browser @azure/msal-angular@latest
62
- ```
63
-
64
- ## Usage
65
-
66
- MSAL Angular Basics
67
- 1. [Initialization](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-angular/docs/initialization.md)
68
- 1. [Public APIs](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-angular/docs/public-apis.md)
69
- 1. [Using redirects](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-angular/docs/redirects.md)
70
- 1. [Using the MsalGuard](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-angular/docs/msal-guard.md)
71
- 1. [Using the MsalInterceptor](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-angular/docs/msal-interceptor.md)
72
- 1. [Known issues](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-angular/docs/known-issues.md)
73
-
74
- Advanced Topics
75
- 1. [Logging](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-angular/docs/logging.md)
76
- 1. [Multi-Tenant](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-angular/docs/multi-tenant.md)
77
- 1. [Security](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-angular/docs/security.md)
78
- 1. [Events](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-angular/docs/events.md)
79
- 1. [Angular Universal and SSR](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-angular/docs/angular-universal.md)
80
- 1. [Performance](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-angular/docs/performance.md)
81
-
82
- Documentation specifically for MSAL Angular v2 can be found [here](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/msal-lts/lib/msal-angular/docs/v2-docs/).
83
- Documentation specifically for MSAL Angular v1 can be found [here](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/msal-lts/lib/msal-angular/docs/v1-docs/).
84
-
85
- ## Samples
86
-
87
- ### MSAL Angular v3 Samples
88
- * [Angular v15](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/samples/msal-angular-v3-samples/angular15-sample-app)
89
- * [Angular v16](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/samples/msal-angular-v3-samples/angular16-sample-app)
90
- * [Angular v16 B2C Sample](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/samples/msal-angular-v3-samples/angular-b2c-sample-app)
91
-
92
- ### MSAL Angular v2 Samples
93
- * [Angular v9](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/msal-lts/samples/msal-angular-v2-samples/angular9-v2-sample-app)
94
- * [Angular v10](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/msal-lts/samples/msal-angular-v2-samples/angular10-sample-app)
95
- * [Angular v11](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/msal-lts/samples/msal-angular-v2-samples/angular11-sample-app)
96
- * [Angular v12](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/msal-lts/samples/msal-angular-v2-samples/angular12-sample-app)
97
- * [Angular v13 RxJS v6](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/msal-lts/samples/msal-angular-v2-samples/angular13-rxjs6-sample-app)
98
- * [Angular v13 RxJS v7](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/msal-lts/samples/msal-angular-v2-samples/angular13-rxjs7-sample-app)
99
- * [Angular v14 RxJS v6](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/msal-lts/samples/msal-angular-v2-samples/angular14-rxjs6-sample-app)
100
- * [Angular v14 RxJS v7](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/msal-lts/samples/msal-angular-v2-samples/angular14-rxjs7-sample-app)
101
- * [Angular v14 B2C Sample](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/msal-lts/samples/msal-angular-v2-samples/angular-b2c-sample-app)
102
-
103
- See [here](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/msal-lts/samples/msal-angular-v2-samples/README.md) for specific features demonstrated by our MSAL Angular v2 samples.
104
-
105
- ### Advanced MSAL Angular v2 Samples
106
- * [Angular SPA with ASP.NET Core web API](https://github.com/Azure-Samples/ms-identity-javascript-angular-tutorial/tree/main/3-Authorization-II/1-call-api)
107
- * [Angular SPA with APS.NET Core web API using App Roles and RBAC](https://github.com/Azure-Samples/ms-identity-javascript-angular-tutorial/tree/main/5-AccessControl/1-call-api-roles)
108
- * [Angular SPA calling Microsoft Graph via ASP.NET Core web API using on-behalf-of flow](https://github.com/Azure-Samples/ms-identity-javascript-angular-tutorial/tree/main/6-AdvancedScenarios/1-call-api-obo)
109
- * [Multi-tenant tutorial using MSAL Angular v2](https://github.com/Azure-Samples/ms-identity-javascript-angular-tutorial/tree/main/6-AdvancedScenarios/2-call-api-mt)
110
- * [Deployment tutorial using Azure App Service and Azure Storage](https://github.com/Azure-Samples/ms-identity-javascript-angular-tutorial/tree/main/4-Deployment)
111
-
112
- ### MSAL Angular v1 Samples
113
- * [Angular v6](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/msal-angular-v1/samples/msal-angular-samples/angular6-sample-app)
114
- * [Angular v7](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/msal-angular-v1/samples/msal-angular-samples/angular7-sample-app)
115
- * [Angular v8](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/msal-angular-v1/samples/msal-angular-samples/angular8-sample-app)
116
- * [Angular v9](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/msal-angular-v1/samples/msal-angular-samples/angular9-sample-app)
117
-
118
- ## Build and running tests
119
-
120
- If you want to build the library and run all the unit tests, you can do the following.
121
-
122
- First navigate to the root directory of the library(msal-angular) and install the dependencies:
123
-
124
- npm install
125
-
126
- Then use the following command to build the library and run all the unit tests:
127
-
128
- npm run build
129
-
130
- npm run test
131
-
132
- ## Versioning
133
-
134
- This library controls how users sign-in and access services. We recommend you always take the latest version of our library in your app when possible. We use [semantic versioning](http://semver.org) so you can control the risk associated with updating your app. As an example, always downloading the latest minor version number (e.g. x._y_.x) ensures you get the latest security and feature enhanements but our API surface remains the same. You can always see the latest version and release notes under the Releases tab of GitHub.
135
-
136
- ## Community Help and Support
137
-
138
- - [Msal Browser FAQ](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-browser/FAQ.md) for access to our frequently asked questions
139
- - [Stack Overflow](http://stackoverflow.com/questions/tagged/msal) using tag "msal".
140
- We highly recommend you ask your questions on Stack Overflow first and browse existing issues to see if someone has asked your question before.
141
- - [GitHub Issues](https://github.com/AzureAD/microsoft-authentication-library-for-js/issues/templates/edit) for reporting a bug or feature requests
142
- - [User Voice page](https://feedback.azure.com/forums/169401-azure-active-directory) to provide recommendations and/or feedback
143
-
144
- ## Contribute
145
-
146
- We enthusiastically welcome contributions and feedback. Please read the [contributing guide](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/contributing.md) before you begin.
147
-
148
- ## Security Reporting
149
-
150
- If you find a security issue with our libraries or services please report it to [secure@microsoft.com](mailto:secure@microsoft.com) 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://technet.microsoft.com/security/dd252948) and subscribing to Security Advisory Alerts.
151
-
152
- ## License
153
-
154
- Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License (the "License").
155
-
156
- ## We Value and Adhere to the Microsoft Open Source Code of Conduct
157
-
1
+ # Microsoft Authentication Library for Angular
2
+
3
+ ![npm (scoped)](https://img.shields.io/npm/v/@azure/msal-angular)
4
+ ![npm](https://img.shields.io/npm/dw/@azure/msal-angular)
5
+ [![codecov](https://codecov.io/gh/AzureAD/microsoft-authentication-library-for-js/branch/dev/graph/badge.svg?flag=msal-angular)](https://codecov.io/gh/AzureAD/microsoft-authentication-library-for-js)
6
+
7
+ | <a href="https://docs.microsoft.com/azure/active-directory/develop/tutorial-v2-angular-auth-code" 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_angular.html" target="_blank">Library Reference</a> | [Support](README.md#community-help-and-support) | <a href="https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/samples/msal-angular-v3-samples" target="blank">Samples</a>
8
+ | --- | --- | --- | --- | --- |
9
+
10
+ 1. [About](#about)
11
+ 1. [Guides](#guides)
12
+ 1. [FAQ](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-angular/FAQ.md)
13
+ 1. [Changelog](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-angular/CHANGELOG.md)
14
+ 1. [Version Support](#version-support)
15
+ 1. [Prerequisites](#prerequisites)
16
+ 1. [Installation](#installation)
17
+ 1. [Usage](#usage)
18
+ 1. [Samples](#samples)
19
+ 1. [Build and running tests](#build-and-running-tests)
20
+ 1. [Versioning](#versioning)
21
+ 1. [Community Help and Support](#community-help-and-support)
22
+ 1. [Contribute](#contribute)
23
+ 1. [Security Reporting](#security-reporting)
24
+ 1. [License](#license)
25
+ 1. [Code of Conduct](#we-value-and-adhere-to-the-microsoft-open-source-code-of-conduct)
26
+
27
+ ## About
28
+
29
+ MSAL for Angular enables Angular web 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
+
31
+ The `@azure/msal-angular` package described by the code in this folder wraps the [`@azure/msal-browser` package](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-browser) and uses it as a peer dependency to enable authentication in Angular Web 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 description provided by [@azure/msal-browser](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-browser#implicit-flow-vs-authorization-code-flow-with-pkce). If you are looking for the version of the library that uses the implicit flow, please see the [MSAL Angular v1 library](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/msal-angular-v1/lib/msal-angular).
32
+
33
+ The current `@azure/msal-angular` library improves upon the previous version and utilizes the authorization code flow. Most features available in the old library will be available in this one, but there are nuances to the authentication flow in both. The latest `@azure/msal-angular` package does NOT support the implicit flow.
34
+
35
+ ## Guides
36
+
37
+ - [Upgrade Guide (v2-v3)](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-angular/docs/v2-v3-upgrade-guide.md)
38
+ - [Upgrade Guide (v1-v2)](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-angular/docs/v1-v2-upgrade-guide.md)
39
+ - [Upgrade Guide (v0-v1)](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-angular/docs/v0-v1-upgrade-guide.md)
40
+ - [Configuration](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-angular/docs/configuration.md)
41
+
42
+ ## Version Support
43
+
44
+ At a minimum, `@azure/msal-angular` will follow the [support schedule of the main Angular project](https://angular.io/guide/releases#support-policy-and-schedule). We may continue to support certain versions of Angular that are not under Active or LTS support from the main Angular project on a version-by-version basis, as defined below.
45
+
46
+ | MSAL Angular version | MSAL support status | Supported Angular versions |
47
+ |----------------------|-------------------------|----------------------------|
48
+ | MSAL Angular v3-alpha | Active development | 15, 16 |
49
+ | MSAL Angular v2 | In maintenance | 9, 10, 11, 12, 13, 14 |
50
+ | MSAL Angular v1 | In maintenance | 6, 7, 8, 9 |
51
+ | MSAL Angular v0 | Out of support | 4, 5 |
52
+
53
+ ## Prerequisites
54
+
55
+ Before using `@azure/msal-angular`, [register an application in Azure AD](https://docs.microsoft.com/azure/active-directory/develop/quickstart-register-app) to get your `clientId`.
56
+
57
+ ## Installation
58
+
59
+ The `@azure/msal-angular` package is available on NPM:
60
+ ```
61
+ npm install @azure/msal-browser @azure/msal-angular@latest
62
+ ```
63
+
64
+ ## Usage
65
+
66
+ MSAL Angular Basics
67
+ 1. [Initialization](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-angular/docs/initialization.md)
68
+ 1. [Public APIs](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-angular/docs/public-apis.md)
69
+ 1. [Using redirects](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-angular/docs/redirects.md)
70
+ 1. [Using the MsalGuard](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-angular/docs/msal-guard.md)
71
+ 1. [Using the MsalInterceptor](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-angular/docs/msal-interceptor.md)
72
+ 1. [Known issues](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-angular/docs/known-issues.md)
73
+
74
+ Advanced Topics
75
+ 1. [Logging](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-angular/docs/logging.md)
76
+ 1. [Multi-Tenant](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-angular/docs/multi-tenant.md)
77
+ 1. [Security](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-angular/docs/security.md)
78
+ 1. [Events](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-angular/docs/events.md)
79
+ 1. [Angular Universal and SSR](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-angular/docs/angular-universal.md)
80
+ 1. [Performance](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-angular/docs/performance.md)
81
+
82
+ Documentation specifically for MSAL Angular v2 can be found [here](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/msal-lts/lib/msal-angular/docs/v2-docs/).
83
+ Documentation specifically for MSAL Angular v1 can be found [here](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/msal-lts/lib/msal-angular/docs/v1-docs/).
84
+
85
+ ## Samples
86
+
87
+ ### MSAL Angular v3 Samples
88
+ * [Angular v15](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/samples/msal-angular-v3-samples/angular15-sample-app)
89
+ * [Angular v16](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/samples/msal-angular-v3-samples/angular16-sample-app)
90
+ * [Angular v16 B2C Sample](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/samples/msal-angular-v3-samples/angular-b2c-sample-app)
91
+
92
+ ### MSAL Angular v2 Samples
93
+ * [Angular v9](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/msal-lts/samples/msal-angular-v2-samples/angular9-v2-sample-app)
94
+ * [Angular v10](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/msal-lts/samples/msal-angular-v2-samples/angular10-sample-app)
95
+ * [Angular v11](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/msal-lts/samples/msal-angular-v2-samples/angular11-sample-app)
96
+ * [Angular v12](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/msal-lts/samples/msal-angular-v2-samples/angular12-sample-app)
97
+ * [Angular v13 RxJS v6](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/msal-lts/samples/msal-angular-v2-samples/angular13-rxjs6-sample-app)
98
+ * [Angular v13 RxJS v7](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/msal-lts/samples/msal-angular-v2-samples/angular13-rxjs7-sample-app)
99
+ * [Angular v14 RxJS v6](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/msal-lts/samples/msal-angular-v2-samples/angular14-rxjs6-sample-app)
100
+ * [Angular v14 RxJS v7](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/msal-lts/samples/msal-angular-v2-samples/angular14-rxjs7-sample-app)
101
+ * [Angular v14 B2C Sample](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/msal-lts/samples/msal-angular-v2-samples/angular-b2c-sample-app)
102
+
103
+ See [here](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/msal-lts/samples/msal-angular-v2-samples/README.md) for specific features demonstrated by our MSAL Angular v2 samples.
104
+
105
+ ### Advanced MSAL Angular v2 Samples
106
+ * [Angular SPA with ASP.NET Core web API](https://github.com/Azure-Samples/ms-identity-javascript-angular-tutorial/tree/main/3-Authorization-II/1-call-api)
107
+ * [Angular SPA with APS.NET Core web API using App Roles and RBAC](https://github.com/Azure-Samples/ms-identity-javascript-angular-tutorial/tree/main/5-AccessControl/1-call-api-roles)
108
+ * [Angular SPA calling Microsoft Graph via ASP.NET Core web API using on-behalf-of flow](https://github.com/Azure-Samples/ms-identity-javascript-angular-tutorial/tree/main/6-AdvancedScenarios/1-call-api-obo)
109
+ * [Multi-tenant tutorial using MSAL Angular v2](https://github.com/Azure-Samples/ms-identity-javascript-angular-tutorial/tree/main/6-AdvancedScenarios/2-call-api-mt)
110
+ * [Deployment tutorial using Azure App Service and Azure Storage](https://github.com/Azure-Samples/ms-identity-javascript-angular-tutorial/tree/main/4-Deployment)
111
+
112
+ ### MSAL Angular v1 Samples
113
+ * [Angular v6](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/msal-angular-v1/samples/msal-angular-samples/angular6-sample-app)
114
+ * [Angular v7](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/msal-angular-v1/samples/msal-angular-samples/angular7-sample-app)
115
+ * [Angular v8](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/msal-angular-v1/samples/msal-angular-samples/angular8-sample-app)
116
+ * [Angular v9](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/msal-angular-v1/samples/msal-angular-samples/angular9-sample-app)
117
+
118
+ ## Build and running tests
119
+
120
+ If you want to build the library and run all the unit tests, you can do the following.
121
+
122
+ First navigate to the root directory of the library(msal-angular) and install the dependencies:
123
+
124
+ npm install
125
+
126
+ Then use the following command to build the library and run all the unit tests:
127
+
128
+ npm run build
129
+
130
+ npm run test
131
+
132
+ ## Versioning
133
+
134
+ This library controls how users sign-in and access services. We recommend you always take the latest version of our library in your app when possible. We use [semantic versioning](http://semver.org) so you can control the risk associated with updating your app. As an example, always downloading the latest minor version number (e.g. x._y_.x) ensures you get the latest security and feature enhanements but our API surface remains the same. You can always see the latest version and release notes under the Releases tab of GitHub.
135
+
136
+ ## Community Help and Support
137
+
138
+ - [Msal Browser FAQ](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-browser/FAQ.md) for access to our frequently asked questions
139
+ - [Stack Overflow](http://stackoverflow.com/questions/tagged/msal) using tag "msal".
140
+ We highly recommend you ask your questions on Stack Overflow first and browse existing issues to see if someone has asked your question before.
141
+ - [GitHub Issues](https://github.com/AzureAD/microsoft-authentication-library-for-js/issues/templates/edit) for reporting a bug or feature requests
142
+ - [User Voice page](https://feedback.azure.com/forums/169401-azure-active-directory) to provide recommendations and/or feedback
143
+
144
+ ## Contribute
145
+
146
+ We enthusiastically welcome contributions and feedback. Please read the [contributing guide](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/contributing.md) before you begin.
147
+
148
+ ## Security Reporting
149
+
150
+ If you find a security issue with our libraries or services please report it to [secure@microsoft.com](mailto:secure@microsoft.com) 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://technet.microsoft.com/security/dd252948) and subscribing to Security Advisory Alerts.
151
+
152
+ ## License
153
+
154
+ Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License (the "License").
155
+
156
+ ## We Value and Adhere to the Microsoft Open Source Code of Conduct
157
+
158
158
  This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
package/angular.json ADDED
@@ -0,0 +1,51 @@
1
+ {
2
+ "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3
+ "version": 1,
4
+ "newProjectRoot": "projects",
5
+ "projects": {
6
+ "msal-angular": {
7
+ "projectType": "library",
8
+ "root": "",
9
+ "sourceRoot": "src",
10
+ "prefix": "lib",
11
+ "architect": {
12
+ "build": {
13
+ "builder": "@angular-devkit/build-angular:ng-packagr",
14
+ "options": {
15
+ "tsConfig": "./tsconfig.lib.json",
16
+ "project": "./ng-package.json"
17
+ },
18
+ "configurations": {
19
+ "production": {
20
+ "tsConfig": "./tsconfig.lib.prod.json"
21
+ }
22
+ }
23
+ },
24
+ "test": {
25
+ "builder": "@angular-devkit/build-angular:karma",
26
+ "options": {
27
+ "main": "./src/test.ts",
28
+ "tsConfig": "./tsconfig.spec.json",
29
+ "karmaConfig": "./karma.conf.js",
30
+ "codeCoverage": true
31
+ }
32
+ },
33
+ "lint": {
34
+ "builder": "@angular-devkit/build-angular:tslint",
35
+ "options": {
36
+ "tsConfig": [
37
+ "./tsconfig.lib.json",
38
+ "./tsconfig.spec.json"
39
+ ],
40
+ "exclude": [
41
+ "**/node_modules/**"
42
+ ]
43
+ }
44
+ }
45
+ }
46
+ }
47
+ },
48
+ "cli": {
49
+ "analytics": false
50
+ }
51
+ }