repowise 0.1.51 → 0.1.52
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.
- package/dist/bin/repowise.js +5 -0
- package/package.json +1 -1
package/dist/bin/repowise.js
CHANGED
|
@@ -73,6 +73,10 @@ import { readFile as readFile2, writeFile as writeFile2, mkdir as mkdir2, chmod,
|
|
|
73
73
|
import http from "http";
|
|
74
74
|
import { homedir as homedir2 } from "os";
|
|
75
75
|
import { join as join2 } from "path";
|
|
76
|
+
function getCognitoConfigForStorage() {
|
|
77
|
+
const { domain, clientId, region, customDomain } = getCognitoConfig();
|
|
78
|
+
return { domain, clientId, region, customDomain };
|
|
79
|
+
}
|
|
76
80
|
function getCognitoConfig() {
|
|
77
81
|
const env = getEnvConfig();
|
|
78
82
|
return {
|
|
@@ -1813,6 +1817,7 @@ Waiting for authentication...`);
|
|
|
1813
1817
|
}
|
|
1814
1818
|
spinner.start("Exchanging authorization code...");
|
|
1815
1819
|
const credentials = await exchangeCodeForTokens(code, codeVerifier);
|
|
1820
|
+
credentials.cognito = getCognitoConfigForStorage();
|
|
1816
1821
|
await storeCredentials(credentials);
|
|
1817
1822
|
const { email } = decodeIdToken(credentials.idToken);
|
|
1818
1823
|
spinner.succeed(chalk6.green(`Logged in as ${chalk6.bold(email)}`));
|