Skip to content

Commit 9d2d4f1

Browse files
committed
remove always opening web console on same region as defined in SSO profile
1 parent 844b5f3 commit 9d2d4f1

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ const signInHandler = async (argv) => {
5151
} = await getCredentials(accessToken, accountId, roleName, region);
5252

5353
if (argv.web) {
54-
open(await getSigninUrl(accessKeyId, secretAccessKey, sessionToken, region));
54+
open(await getSigninUrl(accessKeyId, secretAccessKey, sessionToken));
5555
} else {
5656
console.log(
5757
"",

lib/web.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ const buildURLQuery = (obj) =>
77
.map((pair) => pair.map(encodeURIComponent).join("="))
88
.join("&");
99

10-
export const getSigninUrl = async (accessKeyId, secretAccessKey, sessionToken, region) => {
10+
export const getSigninUrl = async (accessKeyId, secretAccessKey, sessionToken) => {
1111
const federationUrl = "https://signin.aws.amazon.com/federation";
12-
const destinationUrl = `https://console.aws.amazon.com/console/home?region=${region}`;
12+
const destinationUrl = `https://console.aws.amazon.com/console/home`;
1313

1414
try {
1515
const response = await axios.get(federationUrl, {

0 commit comments

Comments
 (0)