Tyler James Leonhardt and GitHub
6544b003dc
Bump msal-node and fix a bad contrast ratio ( #226210 )
...
Bumps MSAL-node which contains [my fix](https://github.com/AzureAD/microsoft-authentication-library-for-js/pull/7247 ) that will actually show our error template.
Also fixes an A11y contrast issue with said error template.
2024-08-22 00:53:21 +02:00
Tyler James Leonhardt and GitHub
e1db90f81d
Add logging for deciding on MSAL ( #226112 )
...
so it's clear why
2024-08-20 18:28:02 -07:00
Tyler James Leonhardt and GitHub
c125b90d41
Add experimentation to Microsoft auth ( #226107 )
...
* Add experimentation to Microsoft auth
So that we can gradually roll out MSAL support.
* correct order
2024-08-20 17:17:15 -07:00
Tyler James Leonhardt and GitHub
b2d6860308
Improve refresh and scope handling ( #225832 )
...
* Moves the `setupRefresh` stuff into the CachedPublicClientApp simplifying things a bit
* Uses a ScopeData class to handle all scope operations fixing an issue where we were passing in the wrong array into the `acquireTokenInteractive`
2024-08-17 07:55:33 +02:00
Tyler James Leonhardt and GitHub
9d49135f49
LoopbackClientAndOpener Tests ( #225458 )
...
(first tests in this extension!)
2024-08-12 18:42:44 -07:00
Tyler James Leonhardt and GitHub
44464d7ccd
Fix reload modal logic when turning on/off MSAL ( #225446 )
...
This wasn't firing before. This fixes that.
2024-08-13 00:24:18 +02:00
Tyler James Leonhardt and GitHub
a8b2cef91c
Adopt error template and some minor tweaks to error rendering ( #225426 )
...
NOTE: For this to get lit up, this PR needs to go in in MSAL-node: https://github.com/AzureAD/microsoft-authentication-library-for-js/pull/7247
2024-08-12 20:05:04 +02:00
Tyler James Leonhardt and GitHub
70d27743ac
Ability to use MSAL in the Desktop ( #225272 )
...
* Ability to use MSAL in the Desktop
* add comment about MSAL workaround
2024-08-09 12:18:34 -07:00
Tyler James Leonhardt and GitHub
02b638ae27
Finalize getAccounts API ( #224877 )
...
Fixes https://github.com/microsoft/vscode/issues/152399
2024-08-05 11:59:33 -07:00
Tyler James Leonhardt and GitHub
86495e947b
Use global fetch and crypto ( #221736 )
...
Now that we're on Node 20, we can just use the global fetch and crypto which work the same in node and in the browser.
2024-07-15 10:58:31 -07:00
Tyler James Leonhardt and GitHub
649bcae6d3
Plumb error through to auth page ( #221511 )
...
plumb error through to auth page
2024-07-11 14:50:49 -07:00
Tyler James Leonhardt and GitHub
5d7157cb03
Implement getAccounts API over getSessions ( #215874 )
...
And plumb that through to the Microsoft auth provider
2024-06-16 18:12:37 -07:00
Robo and GitHub
5216c04428
chore: update to electron 29 ( #209818 )
...
* chore: update electron@29.1.0
* chore: update typings to 20.x
* chore: bump electron@29.1.5
* ci: fix crash in compiling extensions-ci
* chore: disable .d.ts check for build/
$ ../node_modules/.bin/tsc -p tsconfig.build.json
node_modules/@types/chokidar/index.d.ts:21:14 - error TS2420: Class 'import("/Users/demohan/github/vscode/build/node_modules/@types/chokidar/index").FSWatcher' incorrectly implements interface 'import("fs").FSWatcher'.
Type 'FSWatcher' is missing the following properties from type 'FSWatcher': ref, unref
21 export class FSWatcher extends EventEmitter implements fs.FSWatcher {
~~~~~~~~~
node_modules/chokidar/types/index.d.ts:8:14 - error TS2420: Class 'import("/Users/demohan/github/vscode/build/node_modules/chokidar/types/index").FSWatcher' incorrectly implements interface 'import("fs").FSWatcher'.
Type 'FSWatcher' is missing the following properties from type 'FSWatcher': ref, unref
8 export class FSWatcher extends EventEmitter implements fs.FSWatcher {
~~~~~~~~~
Found 2 errors in 2 files.
Errors Files
1 node_modules/@types/chokidar/index.d.ts:21
1 node_modules/chokidar/types/index.d.ts:8
Refs https://github.com/paulmillr/chokidar/commit/a0f9e09f64ce7ae70cc6ae1f5615f65cb35f532f
* chore: update core types
* temp: fix layer validation
* chore: update nodejs checksums
* ci: use latest v20 LTS for missing node-gyp
Refs https://github.com/npm/cli/commit/eacec5f49060d3dfcdc3c7043115619e4bb22864
* ci: define LIBCPP_HARDENING_MODE
* ci: fix crash in vscode-web-min-ci
* chore: update rpm deps-list
* chore: bump tree-sitter-typescript@0.20 .5
* chore: bump electron@29.3.0
* chore: bump electron@29.3.1
* chore: update rpm deps-list for x86_64
* ci: disable io_uring UV backend on linux
* ci: disable io_uring backend for oss as well
* chore: update typings to 20.x
* ci: add TODO for io_uring workaround
* chore: bump distro
* chore: update preinstall node version checks
* chore: update @types/gulp
Refs https://github.com/microsoft/vscode/issues/212442
* ci: disable io_uring in more test suites
2024-05-11 01:20:28 +09:00
Tyler James Leonhardt and GitHub
1357fca0f7
Add cancellable promise to Microsoft auth flows ( #211495 )
...
Fixes #211406
2024-04-27 01:06:58 +02:00
Tyler James Leonhardt and GitHub
1501e97f52
preferred_username should be... preferred ( #199445 )
...
Apparently it's possible for preferred_username to be like `foo@mybiz.com ` while `email` is set to `foo@mybizemail.com `... This is the more correct ordering.
2023-11-28 12:45:50 -08:00
Logan Ramos and GitHub
9bea1fc96a
Bump telemetry package ( #197168 )
2023-11-01 20:51:03 +01:00
Tyler James Leonhardt and GitHub
d5c2817e69
Use email for label & use label to group results in Account menu ( #193727 )
...
So, when you make a new session in the Microsoft Identity stack, depending on the scopes you pass in you might get:
* A token with a name & email
* A token with just a name
Additionally, Microsoft has like 3-4 concepts of essentially an "id" but depending on what you're trying to access, you might get a different value.
This historical behavior leads to 2 awkward things:
1. The account menu shows two accounts, one with name & email, one with just email.
2. The account menu shows two of the same accounts, but their underlying id is different
So, to fix this, we're just gonna lean on the labels. In other words, if there are two accounts that share the same label, then they will be grouped together.
The previous behavior was hurting the Azure Account folks and the Q# folks and with this change, I believe they both should be happy.
Interestingly enough, when I inherited this code, it use to do this, but I changed it to use the id as that seemed "more correct"... so it a way, this is reverting a change I did a while back.
Fixes https://github.com/microsoft/vscode/issues/184218
2023-09-21 14:09:25 -07:00
Logan Ramos and GitHub
cc98e55794
Fix slow telemetry module ( #193607 )
2023-09-20 20:14:12 +01:00
Matt Bierner and GitHub
2c52e4ca35
Alias Thenable to PromiseLike ( #192456 )
...
Fixes #192385
This fixes some typing issues with `Thenable` that were hiding potential bugs
2023-09-13 10:50:40 -07:00
Tyler James Leonhardt and GitHub
379d31d162
Invoke session change emitter when session is created in getSession ( #192828 )
...
fixes https://github.com/microsoft/vscode/issues/192806
2023-09-12 09:13:33 -07:00
Tyler James Leonhardt and GitHub
41e940f76f
Use SequencerByKey to sequence operations of the same set of scopes ( #192638 )
...
The idea here is... if a token is currently being refreshed, well then getting a token of those scopes should wait for that to finish.
Core has a really nice `SequencerByKey` for exactly this kind of thing, and so I've stolen that and started to organize the code with a `common` folder.
Oh, I also noticed we were sorting twice and fixed that to only sort once.
ref https://github.com/microsoft/vscode/issues/186693
2023-09-09 07:09:20 +02:00
Tyler James Leonhardt and GitHub
52f27e2e2f
Log a lot more of the Microsoft Auth extension ( #192629 )
...
This PR adds a ton more logging, a consistant format, and fixes the log levels of some.
Additionally, there are two small fixes that I have included:
* we were firing the `_sessionChangeEmitter` twice when a session was removed
* when processing updates from other windows, we returned instead of continued... thus were only processing the first account that was added in another window
2023-09-08 23:25:25 +02:00
Tyler James Leonhardt and GitHub
9fbd538cb3
Revert back to 2/3rds ( #192502 )
...
It was higher for debugging purposes.
2023-09-08 02:23:16 +02:00
Tyler James Leonhardt and GitHub
53d03d0742
Implement a "pending store" and only actually store the last one ( #192488 )
...
ref https://github.com/microsoft/vscode/issues/186693
2023-09-07 14:32:15 -07:00
Tyler James Leonhardt and GitHub
5134662139
Remove CredentialsService & keytar ( #192224 )
...
* Remove CredentialsService & keytar
ref https://github.com/microsoft/vscode/issues/115215
fixes https://github.com/microsoft/vscode/issues/143395
* compile
* remove imports
* rip the bandaid
2023-09-05 17:47:30 -07:00
Logan Ramos and GitHub
ecb0c80fc1
Bump extension telemetry module ( #191237 )
...
* Bump extension telemetry module
* Fix webpack
2023-08-24 12:53:41 -07:00
ea490e5545
chore: update to Electron 25 ( #188268 )
...
* chore: update electron@25.3.0
* ci: update NodeTool version
* chore: update @types/node
* add more common types to layers checker
* chore: update debian dependencies
* chore: update rpm dependencies
* fix: use legacy dns result order of Node.js
* ci: remove deprecated always-auth npm config
Refs npm/cli@72a7eeb
* chore: update deb and rpm dependencies
* chore: update armhf rpm dependencies
* chore: update x64 debian dependencies
* chore: update x64 rpm dependencies
* chore: update electron@25.3.1
* chore: update electron@25.4.0
* chore: bump distro
* chore: bump distro
---------
Co-authored-by: Benjamin Pasero <benjamin.pasero@microsoft.com >
2023-08-07 21:46:27 +09:00
Tyler James Leonhardt and GitHub
cb38b1b567
Fire event when using non-localserver flow ( #189493 )
...
Fixes https://github.com/microsoft/vscode/issues/186558
2023-08-02 11:26:09 -07:00
Raymond Zhao and GitHub
5be539a588
Bump semver ( #187654 )
2023-07-12 01:49:45 +02:00
Tyler James Leonhardt and GitHub
dd2441f7ba
Polish Sovereign Cloud support ( #184634 )
...
* Use `@azure/ms-rest-azure-env` as official reference of endpoints
* Allow better configuration of custom clouds (these are new so it is ok to change the settings without migration)
Also clean up:
* querystring -> URLSearchParams (getting rid of a package dependency in the web)
* handle `workbench.getCodeExchangeProxyEndpoints` in one place
2023-06-08 12:39:29 -07:00
Benjamin Pasero and GitHub
3a69e153f6
quick access - allow a Promise<FastAndSlowPicks<T>> and adopt for commands ( #180664 )
...
* quick access - allow a `Promise<FastAndSlowPicks<T>>` and adopt for commands
* fix telemetry
2023-04-24 06:41:25 +02:00
Tyler James Leonhardt and GitHub
bede6ba243
Instrument Microsoft account type ( #180573 )
...
So we can see if folks are using MSA or AAD accounts. Also, this cleans up some dead code.
Fixes https://github.com/microsoft/vscode-internalbacklog/issues/3903
2023-04-21 14:23:34 -07:00
Tyler James Leonhardt and GitHub
3a02bc9de1
Updates from the rename ( #179901 )
...
* Updates from the rename
Azure Cloud -> Microsoft Sovereign Cloud
* remove azure once more
2023-04-13 13:01:13 -07:00
Tyler James Leonhardt and GitHub
b0d7acec38
Logger per auth provider ( #179896 )
...
So that we can have an output channel for each.
2023-04-13 19:26:36 +01:00
Brandon Waterloo [MSFT] and GitHub
f9d14d68fb
Support sovereign/custom clouds in microsoft authentication provider ( #178725 )
2023-04-07 16:38:38 -07:00
Martin Aeschlimann and GitHub
273e74965b
add querystring fallback ( #177250 )
2023-03-15 09:29:41 -07:00
Tyler James Leonhardt and GitHub
71f619cbda
Ensure the original scopes requested are the scopes in the Session returned ( #174645 )
...
Fixes #174631
Fixes #167791
2023-02-17 03:34:39 +01:00
Logan Ramos and GitHub
8e6bcc9b9e
Bump module to new package ( #173599 )
2023-02-06 12:29:36 -08:00
Tyler James Leonhardt and GitHub
7fc1f6aacb
use better mechanism for base64 decoding with unicode characters ( #172445 )
...
Fixes #172441
2023-01-25 21:32:00 +01:00
Logan Ramos and GitHub
8cea434dec
Remove unused proposals ( #172035 )
2023-01-23 19:09:07 +01:00
Tyler James Leonhardt and GitHub
dcb358a79f
Remove console.log ( #171563 )
...
This was for debugging. If it was legit I would have used the logger that's available.
2023-01-18 12:13:23 +11:00
Logan Ramos and GitHub
4acf2d9b46
Update the telemetry modules ( #170512 )
...
Update the module
2023-01-03 15:10:45 -05:00
Matt Bierner and GitHub
c390a331c5
Switch to standard imports ( #169451 )
2022-12-17 00:22:53 +01:00
Tyler James Leonhardt and GitHub
461b3f6184
Only have a single window store the session ( #169356 )
...
Before this change, every single window was writing to the same secret at basically the same time because they would all refresh the token and then attempt to store that refresh token.
I believe this was causing a few race condition bugs that users were seeing.
With this change we now so our best to have only 1 window store the session by relying on the window focused state.
If the window is focused or becomes focused, we will store the refresh token.
If the window detects that another window has stored something, we will not attempt to wait for focus to store something.
If nothing has happened, and it's been 5 hrs (+/- some seconds) go ahead and store it. This is the scenario of when a user has VS Code in the background for like ages but never goes to it.
ref #165115
ref #130893
ref #168485
2022-12-16 06:58:32 +01:00
Logan Ramos and GitHub
b1076b41f3
Bump telemetry packages ( #169283 )
2022-12-15 17:29:10 +01:00
Joyce Er and GitHub
3bdea7784d
authentication implicit activation events (#166715 )
...
* `authentication` implicit activation events
* More safety accessing `.id`
2022-11-19 08:30:48 -08:00
Logan Ramos and GitHub
73d882bcf7
Update telemetry package ( #166292 )
2022-11-14 09:30:33 -08:00
Tyler James Leonhardt and GitHub
ef415578d1
Take advantage of platform features in Microsoft Authentication extension ( #166066 )
2022-11-10 18:26:48 -08:00
Sandeep Somavarapu and GitHub
2cd8ea24f2
#159892 Finalize ( #165925 )
2022-11-09 10:28:27 -05:00
Logan Ramos and GitHub
bf1697d98c
Consume proposed telemetry API ( #165862 )
...
* Consume proposed telemetry API
* Update webpack
2022-11-08 21:58:28 -05:00