Skip to content

Commit 2a1c728

Browse files
fix(codecatalyst): use 'AWS Cloud9' client name with SSO when in C9 (#3354)
Signed-off-by: Nikolas Komonen <[email protected]>
1 parent d370fdb commit 2a1c728

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/credentials/sso/ssoAccessTokenProvider.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import { getRequestId, getTelemetryReason, getTelemetryResult, isClientFault, To
1919
import { getLogger } from '../../shared/logger'
2020
import { telemetry } from '../../shared/telemetry/telemetry'
2121
import { DevSettings } from '../../shared/settings'
22+
import { getIdeProperties, isCloud9 } from '../../shared/extensionUtilities'
2223

2324
const clientRegistrationType = 'public'
2425
const deviceGrantType = 'urn:ietf:params:oauth:grant-type:device_code'
@@ -179,8 +180,9 @@ export class SsoAccessTokenProvider {
179180
}
180181

181182
private async registerClient(): Promise<ClientRegistration> {
183+
const companyName = getIdeProperties().company
182184
return this.oidc.registerClient({
183-
clientName: `AWS Toolkit for VSCode`,
185+
clientName: isCloud9() ? `${companyName} Cloud9` : `${companyName} Toolkit for VSCode`,
184186
clientType: clientRegistrationType,
185187
scopes: this.profile.scopes,
186188
})

0 commit comments

Comments
 (0)