Skip to content

Commit bd55421

Browse files
committed
Handle AmazonQ scope in getAuthFormIds
1 parent 3078bfa commit bd55421

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/core/src/auth/utils.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ import { Auth } from './auth'
4646
import { validateIsNewSsoUrl, validateSsoUrlFormat } from './sso/validation'
4747
import { getLogger } from '../shared/logger/logger'
4848
import { AuthFormId } from '../login/webview/vue/types'
49-
import { AuthUtil } from '../codewhisperer/util/authUtil'
49+
import { amazonQScopes, AuthUtil } from '../codewhisperer/util/authUtil'
5050
import { extensionVersion } from '../shared/vscode/env'
5151
import { CommonAuthWebview } from '../login/webview/vue/backend'
5252
import { AuthSource } from '../login/webview/util'
@@ -793,6 +793,9 @@ export function getAuthFormIdsFromConnection(conn?: Connection): AuthFormId[] {
793793
if (isValidCodeCatalystConnection(conn)) {
794794
authIds.push(`${connType}CodeCatalyst`)
795795
}
796+
if (hasScopes(conn, amazonQScopes)) {
797+
authIds.push(`${connType}CodeWhisperer`)
798+
}
796799

797800
return authIds
798801
}

0 commit comments

Comments
 (0)