Skip to content

Commit adcf832

Browse files
committed
1 parent aca8b08 commit adcf832

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/extension.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -298,8 +298,8 @@ async function resolvePassword(serverSpec, ignoreUnauthenticated = false): Promi
298298
});
299299
}
300300
if (session) {
301-
// If original spec lacked username use the one obtained by the authprovider
302-
serverSpec.username = serverSpec.username || session.scopes[1];
301+
// If original spec lacked username use the one obtained from the user by the authprovider (exact case)
302+
serverSpec.username = serverSpec.username || session.account.id.split("/").slice(1).join("/");
303303
serverSpec.password = session.accessToken;
304304
}
305305
}

0 commit comments

Comments
 (0)