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.
@@ -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
- const { apiUrl } = require("../lib/config").getConfig();
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xtra-cli",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "CLI for XtraSecurity Platform",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -64,4 +64,4 @@
64
64
  ],
65
65
  "author": "XtraSecurity",
66
66
  "license": "ISC"
67
- }
67
+ }