Skip to content

Commit a62ed27

Browse files
Fix redirect URIs in OAuth dynamic registration and tests (microsoft#256288)
1 parent 0cfca37 commit a62ed27

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/vs/base/common/oauth.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -735,14 +735,14 @@ export async function fetchDynamicRegistration(serverMetadata: IAuthorizationSer
735735
redirect_uris: [
736736
'https://insiders.vscode.dev/redirect',
737737
'https://vscode.dev/redirect',
738-
'http://localhost/',
739-
'http://127.0.0.1/',
738+
'http://localhost',
739+
'http://127.0.0.1',
740740
// Added these for any server that might do
741741
// only exact match on the redirect URI even
742742
// though the spec says it should not care
743743
// about the port.
744-
`http://localhost:${DEFAULT_AUTH_FLOW_PORT}/`,
745-
`http://127.0.0.1:${DEFAULT_AUTH_FLOW_PORT}/`
744+
`http://localhost:${DEFAULT_AUTH_FLOW_PORT}`,
745+
`http://127.0.0.1:${DEFAULT_AUTH_FLOW_PORT}`
746746
],
747747
scope: scopes?.join(AUTH_SCOPE_SEPARATOR),
748748
token_endpoint_auth_method: 'none',

src/vs/base/test/common/oauth.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -311,10 +311,10 @@ suite('OAuth', () => {
311311
assert.deepStrictEqual(requestBody.redirect_uris, [
312312
'https://insiders.vscode.dev/redirect',
313313
'https://vscode.dev/redirect',
314-
'http://localhost/',
315-
'http://127.0.0.1/',
316-
`http://localhost:${DEFAULT_AUTH_FLOW_PORT}/`,
317-
`http://127.0.0.1:${DEFAULT_AUTH_FLOW_PORT}/`
314+
'http://localhost',
315+
'http://127.0.0.1',
316+
`http://localhost:${DEFAULT_AUTH_FLOW_PORT}`,
317+
`http://127.0.0.1:${DEFAULT_AUTH_FLOW_PORT}`
318318
]);
319319

320320
// Verify response is processed correctly

0 commit comments

Comments
 (0)