953
? serverMetadata.grant_types_supported.filter(gt => grantTypesSupported.includes(gt))
954
: grantTypesSupported,
955
>
response_types: ['code'],
oauth.ts
956
>
redirect_uris: [
957
>
'https://insiders.vscode.dev/redirect',
958
>
'https://vscode.dev/redirect',
959
>
'http://127.0.0.1/',
960
>
// Added these for any server that might do
961
>
// only exact match on the redirect URI even
962
>
// though the spec says it should not care
963
>
// about the port.
964
>
`http://127.0.0.1:${DEFAULT_AUTH_FLOW_PORT}/`
965
>
],
966
>
scope: scopes?.join(AUTH_SCOPE_SEPARATOR),
967
>
token_endpoint_auth_method: 'none',
968
>
application_type: 'native'
969
>
};
970
>
971
>
const response = await fetch(serverMetadata.registration_endpoint, {
972
>
method: 'POST',
973
>
headers: {
974
>
'Content-Type': 'application/json'
975
>
},
976
>
body: JSON.stringify(requestBody)
977
>
});
978
979
if (!response.ok) {