Skip to content

Commit 21bb85a

Browse files
Merge branch 'dev' into msal-node-proxy-request
2 parents 57811be + 6a2eacf commit 21bb85a

68 files changed

Lines changed: 13646 additions & 1240 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/msal-node-e2e.yml

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,3 +105,90 @@ jobs:
105105
with:
106106
name: e2e-test-screenshots
107107
path: samples/**/screenshots
108+
109+
run-electron-e2e:
110+
if: (github.repository == 'AzureAD/microsoft-authentication-library-for-js') && (github.actor != 'dependabot[bot]') && ((github.event.pull_request.head.repo.full_name == github.repository) || (github.event_name == 'push'))
111+
runs-on: ${{ matrix.os }}
112+
strategy:
113+
fail-fast: false
114+
matrix:
115+
os: [windows-latest, macos-latest]
116+
sample:
117+
- 'ElectronTestApp'
118+
119+
name: ${{ matrix.sample }} - ${{ matrix.os }}
120+
121+
steps:
122+
- uses: actions/checkout@v2
123+
124+
- name: Use Node.js
125+
uses: actions/setup-node@v2
126+
with:
127+
node-version: 16
128+
129+
- name: Restore node_modules for libs
130+
uses: actions/cache@v2
131+
id: lib-cache
132+
with:
133+
path: |
134+
node_modules
135+
lib/*/node_modules
136+
key: ${{ runner.os }}-${{ hashFiles('package-lock.json', 'lib/*/package-lock.json') }}
137+
138+
- name: Clean Install
139+
if: steps.lib-cache.outputs.cache-hit != 'true'
140+
run: npm ci
141+
142+
- name: Build Package
143+
working-directory: samples/msal-node-samples
144+
run: npm run build:package
145+
146+
- name: Restore node_modules for test tools
147+
uses: actions/cache@v2
148+
id: test-tools-cache
149+
with:
150+
path: samples/node_modules
151+
key: ${{ runner.os }}-node-test-tools-${{ hashFiles('samples/package-lock.json') }}
152+
153+
- name: Install Test Tools
154+
if: steps.test-tools-cache.outputs.cache-hit != 'true'
155+
working-directory: samples
156+
run: npm ci
157+
158+
- name: Restore node_modules for sample
159+
uses: actions/cache@v2
160+
id: sample-cache
161+
with:
162+
path: samples/msal-node-samples/${{ matrix.sample }}/node_modules
163+
key: ${{ runner.os }}-electron-e2e-${{ matrix.sample }}-${{ hashFiles(format('samples/msal-node-samples/{0}/package.json', matrix.sample), 'samples/package-lock.json') }}
164+
165+
- name: Install Sample
166+
if: steps.sample-cache.outputs.cache-hit != 'true'
167+
working-directory: samples/msal-node-samples/${{ matrix.sample }}
168+
run: |
169+
npm run install:local
170+
npm install
171+
env:
172+
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
173+
174+
- name: Build Sample
175+
working-directory: samples/msal-node-samples/${{ matrix.sample }}
176+
run: |
177+
npm run build
178+
179+
- name: E2E Tests
180+
working-directory: samples/msal-node-samples/${{ matrix.sample }}
181+
timeout-minutes: 10
182+
env:
183+
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
184+
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
185+
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
186+
DEBUG: pw:browser
187+
run: npm test
188+
189+
- name: Upload E2E Test Screenshots
190+
uses: actions/upload-artifact@v2
191+
if: failure()
192+
with:
193+
name: e2e-test-screenshots
194+
path: samples/**/screenshots
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "patch",
3+
"comment": "Add keyId to SHR header and make x5c_ca claim type string array #4729",
4+
"packageName": "@azure/msal-browser",
5+
"email": "hemoral@microsoft.com",
6+
"dependentChangeType": "patch"
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "minor",
3+
"comment": "Fix empty hash errors in popups #4793",
4+
"packageName": "@azure/msal-browser",
5+
"email": "thomas.norling@microsoft.com",
6+
"dependentChangeType": "patch"
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "patch",
3+
"comment": "Fallback to web flow when native broker throws 'DISABLED' status #4837",
4+
"packageName": "@azure/msal-browser",
5+
"email": "thomas.norling@microsoft.com",
6+
"dependentChangeType": "patch"
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "patch",
3+
"comment": "Add keyId to SHR header and make x5c_ca claim type string array #4729",
4+
"packageName": "@azure/msal-common",
5+
"email": "hemoral@microsoft.com",
6+
"dependentChangeType": "patch"
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "patch",
3+
"comment": "Updated the regex and added a test for detecting public cert for SNI #4790",
4+
"packageName": "@azure/msal-node",
5+
"email": "email not defined",
6+
"dependentChangeType": "patch"
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "patch",
3+
"comment": "export AuthorizationCodePayload type from msal-common #4803",
4+
"packageName": "@azure/msal-node",
5+
"email": "git@hens.by",
6+
"dependentChangeType": "patch"
7+
}

lib/msal-angular/package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/msal-browser/docs/errors.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
1. [interaction_in_progress](#interaction_in_progress)
1212
1. [block_iframe_reload](#block_iframe_reload)
1313
1. [monitor_window_timeout](#monitor_window_timeout)
14+
1. [hash_empty_error](#hash_empty_error)
15+
1. [hash_does_not_contain_known_properties](#hash_does_not_contain_known_properties)
1416
1. [unable_to_acquire_token_from_native_platform](#unable_to_acquire_token_from_native_platform)
1517
1. [native_connection_not_established](#native_connection_not_established)
1618
1. [native_broker_called_before_initialize](#native_broker_called_before_initialize)
@@ -159,6 +161,8 @@ This error can be thrown when calling `ssoSilent`, `acquireTokenSilent`, `acquir
159161
1. You are being throttled by your identity provider
160162
1. Your identity provider did not redirect back to your `redirectUri`.
161163

164+
**Important**: If your application uses a router library (e.g. React Router, Angular Router), please make sure it does not strip the hash or auto-redirect while MSAL token acquisition is in progress. If possible, it is best if your `redirectUri` page does not invoke the router at all.
165+
162166
#### Issues caused by the redirectUri page
163167

164168
When you make a silent call, in some cases, an iframe will be opened and will navigate to your identity provider's authorization page. After the identity provider has authorized the user it will redirect the iframe back to the `redirectUri` with the authorization code or error information in the hash fragment. The MSAL instance running in the frame or window that originally made the request will extract this response hash and process it. If your `redirectUri` is removing or manipulating this hash or navigating to a different page before MSAL has extracted it you will receive this timeout error.
@@ -224,6 +228,25 @@ const msalConfig = {
224228
};
225229
```
226230

231+
### hash_empty_error
232+
233+
**Error Messages**:
234+
235+
> Hash value cannot be processed because it is empty. Please verify that your redirectUri is not clearing the hash.
236+
237+
This error occurs when the page you use as your redirectUri is removing the hash, or auto-redirecting to another page. This most commonly happens when the application implements a router which navigates to another route, dropping the hash.
238+
239+
To resolve this error we recommend using a dedicated redirectUri page which is not subject to the router. For silent and popup calls it's best to use a blank page. If this is not possible please make sure the router does not navigate while MSAL token acquisition is in progress. You can do this by detecting if your application is loaded in an iframe for silent calls, in a popup for popup calls or by awaiting `handleRedirectPromise` for redirect calls.
240+
241+
### hash_does_not_contain_known_properties
242+
243+
**Error Messages**:
244+
245+
> Hash does not contain known properites. Please verify that your redirectUri is not changing the hash.
246+
247+
Please see explanation for [hash_empty_error](#hash_empty_error) above. The root cause for this error is similar, the difference being the hash has been changed, rather than dropped.
248+
249+
227250
### unable_to_acquire_token_from_native_platform
228251

229252
**Error Messages**:

lib/msal-browser/package-lock.json

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)