Skip to content

Commit 20f7366

Browse files
authored
Skip Builder ID logout prompt if connection can't be reused (#3526)
1 parent a52752f commit 20f7366

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type" : "bugfix",
3+
"description" : "Fix confusing experience when attempting to sign in to multiple Builder IDs"
4+
}

jetbrains-core/src/software/aws/toolkits/jetbrains/core/credentials/ToolkitAuthManager.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ fun loginSso(project: Project?, startUrl: String, scopes: List<String> = ALL_SON
107107
val logger = getLogger<ToolkitAuthManager>()
108108
// requested Builder ID, but one already exists
109109
// TBD: do we do this for regular SSO too?
110-
if (connection.isSono()) {
110+
if (connection.isSono() && connection is BearerSsoConnection && scopes.all { it in connection.scopes }) {
111111
val signOut = computeOnEdt {
112112
MessageDialogBuilder.yesNo(
113113
message("toolkit.login.aws_builder_id.already_connected.title"),

0 commit comments

Comments
 (0)