Commit 1a521c3
authored
Enable passing of redirect uri for Nativebroker (#8005)
Current PCA requests don't allow the customer to pass in their own
redirecturi. This is an issue for signed MacOS apps because the customer
is forced to use the unsigned redirect URI which will hit a redirecturi
validation error in the Apple Broker
```
errorMessage: 'Description: Error Domain=MSALErrorDomain Code=-50000 "(null)" UserInfo={MSALErrorDescriptionKey=MSAL redirectUri validation error: redirect uri has incorrect scheme - it must be in the form of msauth.<app_bundle_id>://auth\n' +
'ADAL redirectUri validation error: Source application does not match redirect uri host. Invalid source app., MSALInternalErrorCodeKey=-42000, MSALBrokerVersionKey=5.2508.0}, Domain: MSALErrorDomain.Error was thrown in sourceArea: Broker (Error Code: -42000, Tag: 508638916)',
```
Solution:
Make providing a redirecturi optional. If the customer doesn't provide
one, we fallback to the default for each platform in broker scenarios
For non-broker scenarios, if redirecturi is provided, we warn them it
won't be used and use the default
Also added a function to convert error tags to their string version to
make error lookup quicker.1 parent d1cfe74 commit 1a521c3
File tree
13 files changed
+170
-23
lines changed- change
- extensions/msal-node-extensions
- src
- broker
- error
- utils
- test
- broker
- utils
- lib/msal-node
- apiReview
- src
- client
- error
- request
- test/client
13 files changed
+170
-23
lines changedLines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
Lines changed: 21 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
| |||
193 | 194 | | |
194 | 195 | | |
195 | 196 | | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
196 | 205 | | |
197 | 206 | | |
198 | | - | |
199 | | - | |
200 | 207 | | |
201 | 208 | | |
202 | 209 | | |
| |||
251 | 258 | | |
252 | 259 | | |
253 | 260 | | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
254 | 269 | | |
255 | | - | |
256 | | - | |
257 | 270 | | |
258 | 271 | | |
259 | 272 | | |
| |||
466 | 479 | | |
467 | 480 | | |
468 | 481 | | |
469 | | - | |
470 | | - | |
471 | | - | |
| 482 | + | |
472 | 483 | | |
473 | 484 | | |
474 | 485 | | |
| |||
645 | 656 | | |
646 | 657 | | |
647 | 658 | | |
| 659 | + | |
648 | 660 | | |
649 | | - | |
650 | | - | |
| 661 | + | |
| 662 | + | |
651 | 663 | | |
652 | 664 | | |
653 | 665 | | |
| |||
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
10 | | - | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
21 | | - | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
Lines changed: 17 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| 58 | + | |
58 | 59 | | |
59 | 60 | | |
60 | 61 | | |
| |||
87 | 88 | | |
88 | 89 | | |
89 | 90 | | |
90 | | - | |
91 | | - | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
92 | 101 | | |
93 | 102 | | |
94 | 103 | | |
| |||
672 | 681 | | |
673 | 682 | | |
674 | 683 | | |
675 | | - | |
| 684 | + | |
676 | 685 | | |
677 | 686 | | |
678 | 687 | | |
| |||
1509 | 1518 | | |
1510 | 1519 | | |
1511 | 1520 | | |
1512 | | - | |
| 1521 | + | |
1513 | 1522 | | |
1514 | 1523 | | |
1515 | 1524 | | |
| |||
2287 | 2296 | | |
2288 | 2297 | | |
2289 | 2298 | | |
2290 | | - | |
| 2299 | + | |
2291 | 2300 | | |
2292 | 2301 | | |
2293 | 2302 | | |
| |||
2332 | 2341 | | |
2333 | 2342 | | |
2334 | 2343 | | |
2335 | | - | |
| 2344 | + | |
2336 | 2345 | | |
2337 | 2346 | | |
2338 | 2347 | | |
| |||
2385 | 2394 | | |
2386 | 2395 | | |
2387 | 2396 | | |
2388 | | - | |
| 2397 | + | |
2389 | 2398 | | |
2390 | 2399 | | |
2391 | 2400 | | |
| |||
2430 | 2439 | | |
2431 | 2440 | | |
2432 | 2441 | | |
2433 | | - | |
| 2442 | + | |
2434 | 2443 | | |
2435 | 2444 | | |
2436 | 2445 | | |
| |||
Lines changed: 30 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
325 | 325 | | |
326 | 326 | | |
327 | 327 | | |
328 | | - | |
| 328 | + | |
329 | 329 | | |
330 | 330 | | |
331 | 331 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
166 | | - | |
| 166 | + | |
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
| |||
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
182 | 185 | | |
183 | 186 | | |
184 | 187 | | |
| |||
258 | 261 | | |
259 | 262 | | |
260 | 263 | | |
261 | | - | |
| 264 | + | |
262 | 265 | | |
263 | 266 | | |
264 | 267 | | |
| |||
271 | 274 | | |
272 | 275 | | |
273 | 276 | | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
274 | 281 | | |
275 | 282 | | |
276 | 283 | | |
| |||
0 commit comments