Change:
} const session = await this.exchangeCodeForSession(code, verifier, scopeData); <ins> this._sessionChangeEmitter.fire({ added: [session], removed: [], changed: [] }); </ins> resolve(session); } catch (err) { reject(err);

Discussion:
Type: <bBug</b(Note: this could be an API misunderstanding, but then if this is working as expected I'm not sure how to achieve the results I want) I have a method that looks something like: After calling when not signed in, I would expect this method to resolve after, well, signing in. However, after signing in, what actually happens is...nothing. I have a breakpoint set on the line and it never gets hit. Elsewhere in the codebase, there's another onDidChangeSessions listener, and as far as I can tell, it only gets called when I completely log out of a provider (at which point the listener is called twice as many times as the number of extensions that were using the provider). VS Code version: Code - Insiders 1.80.0-insider (, 2023-06-28T08:01:04.380Z) OS version: WindowsNT x64 10.0. Modes: Remote OS version: WindowsNT x64 10.0. Remote OS version: WindowsNT x64 10.0. <details<summarySystem Info</summary </details<details<summaryExtensions (29)</summaryExtensionVersion ------ vscode-toggle-quotes0.3.6 remotehub0.58.0 wavework1.2023. blazorwasm-companion1.1.4 vscode-edge-devtools2.1.2 remote-containers0.297.0 remote-ssh0.102.0 remote-ssh-edit0.86.0 remote-wsl0.80.2 vscode-remote-extensionpack0.24.0 azure-repos0.34.0 remote-explorer0.4.1 remote-repositories0.36.0 remote-server1.2.1 material-theme3.15.17 midl3-language-server0.0.31 vscode-eslint2.4.2 vscode-research1.2022. vulnerability-extension1.2023. prettier-vscode9.16.0 copilot-chat0.3. copilot-nightly1.93.195 vscode-azdo-codereview1.2022. vscode-nmake-tools4.0.

azure-pipelines1.208.0 vscode-dotnet-runtime1.6.0 sarif-viewer3.3.7 azure-account0.11.5 cpptools1.16.3 (2 theme extensions excluded) </details<details<summaryA/B Experiments</summary</details<!-- generated by issue reporter --
This worked on 1.79.2 but not .
Here's my test extension: With this, I was not able to reproduce the issue. did fire. Can you provide a minimum repro for me?
Hmm, you're right. I'll need to investigate this more and see why I'm seeing something different in our extension.
I'll go ahead and close this for now, but feel free to open a new issue (or reopen) if you get to the bottom of it and it's my fault
here's a recording that repros the bug using the exact same code you are, on a remote SSH session. The event callback only fires after I switch windows back to the host.
this may be silly, but can you try again in today's insiders? I fixed something that could be related...
I'll get back to you after
Hi. We experienced the same problem with our company's : was not triggered after login/logout. It seems to be solved in the insider version. Do you plan to release an update for the fix? Thanks!
we just released 1.80.1. Can you try that stable version and see if it's fixed there?
Fixed. Thanks!
Cool! I'll close this then
Darn, I was just writing up a comment about how this wasn't fixed :(. Let me verify again to be extra-sure, but I still seem to be hitting this on Version: 1.81.0-insider (user setup) Commit: Date: 2023-07-18T05:36:41.526Z Electron: 22.3.14 ElectronBuildId: Chromium: 108.0.5359.215 16.17.1 V8: 10.8.168.25-electron.0 OS: Windows_NT x64 10.0.
Yep, retraced the steps in my video and the behavior is exactly the same.

much like that other issue of yours, I'm curious if: this works for you on another machine this works if you're not using a Remote SSH connection This will be good info to go off of
This issue does repro for me on other machines. But bizarrely, I do need to be in a remote SSH session (or at least, it works locally). Version: 1.81.0-insider (user setup) Commit: Date: 2023-07-28T12:08:04.472Z Electron: 22.3.18 ElectronBuildId: Chromium: 108.0.5359.215 16.17.1 V8: 10.8.168.25-electron.0 OS: Windows_NT x64 10.0.
Ok I just tried this in a dev container and can repro the issue! Thanks! Let me see what's going on here... More info: Doesn't repro with GitHub auth provider so it's specific to Microsoft auth
the only gets fired when we ... but for remote connections we do the flow instead. easy fix.