You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix OAuth redirect URI format to align with Microsoft's URL standards (#260446)
* Fix OAuth redirect URI validation by adding trailing slash
This change adds a trailing slash to the redirect URI returned by the
loopbackServer's redirectUri getter to match the expected format for
OAuth client registration.
The issue occurs because Microsoft Entra ID automatically appends
a trailing slash to redirect URIs without a path segment, but VS Code
was returning URLs without the trailing slash, causing validation
failures during OAuth authentication.
Fixes#260425
* Add trailing slashes to OAuth redirect URIs in dynamic registration
Complements the loopbackServer.ts fix by ensuring redirect URIs used in
OAuth dynamic client registration also include trailing slashes for
complete standards compliance with Microsoft's OAuth 2.0 URL format.
Updated redirect URIs:
- http://localhost -> http://localhost/
- http://127.0.0.1 -> http://127.0.0.1/
- http://localhost:{port} -> http://localhost:{port}/
- http://127.0.0.1:{port} -> http://127.0.0.1:{port}/
* Fix OAuth redirect URI test expectations to match implementation
The fetchDynamicRegistration function correctly includes trailing slashes
on redirect URIs per the implementation. This updates the test expectations
to match the actual behavior, fixing the test failure.
The implementation in oauth.ts includes trailing slashes on localhost URIs:
- 'http://localhost/' (with trailing slash)
- 'http://127.0.0.1/' (with trailing slash)
- 'http://localhost:/' (with trailing slash)
- 'http://127.0.0.1:/' (with trailing slash)
This test was expecting URIs without trailing slashes, causing the assertion
to fail. The fix aligns the test with the correct implementation behavior.
---------
Co-authored-by: Gautam <[email protected]>
Co-authored-by: bluedog13 <>
0 commit comments