@vizamodo/aws-sts-core 0.3.44 → 0.3.45

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -66,15 +66,18 @@ export async function buildFederationLoginUrl(input) {
66
66
  expiryIso,
67
67
  now: Date.now()
68
68
  });
69
- return wrapResult(token, expiryIso);
69
+ return wrapResult({ token }, expiryIso);
70
70
  }, { ttlSec: 60, ...(input.forceRefresh !== undefined ? { forceRefresh: input.forceRefresh } : {}) } // allow caller-controlled retry
71
71
  );
72
72
  if (!SigninToken) {
73
73
  throw new Error("[federation] unable to obtain SigninToken");
74
74
  }
75
+ const rawToken = typeof SigninToken === "string"
76
+ ? SigninToken
77
+ : SigninToken?.token;
75
78
  const baseLogin = `https://signin.aws.amazon.com/federation?Action=login` +
76
79
  `&Issuer=viza` +
77
- `&SigninToken=${SigninToken}`;
80
+ `&SigninToken=${rawToken}`;
78
81
  const intent = input.intent ?? "console";
79
82
  let destinationUrl;
80
83
  switch (intent) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vizamodo/aws-sts-core",
3
- "version": "0.3.44",
3
+ "version": "0.3.45",
4
4
  "description": "Pure AWS STS + SigV4 (X509 Roles Anywhere) core logic",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",