xtra-cli 0.1.3 → 0.1.4
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/commands/login.js +5 -1
- package/package.json +2 -2
package/dist/commands/login.js
CHANGED
|
@@ -167,7 +167,11 @@ async function handleSSOLogin() {
|
|
|
167
167
|
const address = server.address();
|
|
168
168
|
const port = typeof address === 'string' ? 0 : address?.port;
|
|
169
169
|
const callbackUrl = `http://localhost:${port}`;
|
|
170
|
-
|
|
170
|
+
let { apiUrl } = require("../lib/config").getConfig();
|
|
171
|
+
// Hard fallback if getConfig somehow returned the old cached localhost
|
|
172
|
+
if (apiUrl.includes("localhost")) {
|
|
173
|
+
apiUrl = "https://xtra-security.vercel.app/api";
|
|
174
|
+
}
|
|
171
175
|
const ssoUrl = `${apiUrl}/auth/cli/sso?callbackUrl=${encodeURIComponent(callbackUrl)}`;
|
|
172
176
|
console.log(chalk_1.default.blue(`Waiting for browser login... (Opening ${ssoUrl})`));
|
|
173
177
|
await open(ssoUrl);
|
package/package.json
CHANGED