@howone/sdk 0.2.16 → 0.2.17
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/index.js +7 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -274,9 +274,9 @@ var FloatingButton = ({
|
|
|
274
274
|
// src/services/unified-oauth.ts
|
|
275
275
|
init_config();
|
|
276
276
|
var API_BASE_URLS = {
|
|
277
|
-
local: "https://
|
|
278
|
-
dev: "https://
|
|
279
|
-
prod: "https://
|
|
277
|
+
local: "https://api.howone.dev",
|
|
278
|
+
dev: "https://api.howone.dev",
|
|
279
|
+
prod: "https://api.howone.ai"
|
|
280
280
|
};
|
|
281
281
|
var detectEnvironmentFromHostname = () => {
|
|
282
282
|
try {
|
|
@@ -320,6 +320,7 @@ var UnifiedAuthService = class {
|
|
|
320
320
|
};
|
|
321
321
|
const stateString = encodeURIComponent(JSON.stringify(state));
|
|
322
322
|
try {
|
|
323
|
+
console.log("Using API_BASE_URL:", this.API_BASE_URL);
|
|
323
324
|
const response = await fetch(`${this.API_BASE_URL}/api/auth/google?state=${stateString}`);
|
|
324
325
|
const data = await response.json();
|
|
325
326
|
if (!data.data.success || !data.data.authUrl) {
|
|
@@ -383,11 +384,11 @@ var UnifiedAuthService = class {
|
|
|
383
384
|
window.location.origin,
|
|
384
385
|
this.API_BASE_URL,
|
|
385
386
|
// 使用当前环境的 API_BASE_URL
|
|
386
|
-
"https://
|
|
387
|
-
"https://
|
|
387
|
+
"https://api.howone.dev",
|
|
388
|
+
"https://api.howone.ai"
|
|
388
389
|
];
|
|
389
390
|
const isValidOrigin = validOrigins.some(
|
|
390
|
-
(origin) => event.origin === origin || event.origin.includes("localhost") || event.origin.includes("127.0.0.1") || event.origin.includes("fly.dev")
|
|
391
|
+
(origin) => event.origin === origin || event.origin.includes("localhost") || event.origin.includes("127.0.0.1") || event.origin.includes("fly.dev") || event.origin.includes("howone.dev") || event.origin.includes("howone.ai")
|
|
391
392
|
);
|
|
392
393
|
if (!isValidOrigin) {
|
|
393
394
|
return;
|