@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.js
CHANGED
|
@@ -345,9 +345,9 @@ var FloatingButton = ({
|
|
|
345
345
|
// src/services/unified-oauth.ts
|
|
346
346
|
init_config();
|
|
347
347
|
var API_BASE_URLS = {
|
|
348
|
-
local: "https://
|
|
349
|
-
dev: "https://
|
|
350
|
-
prod: "https://
|
|
348
|
+
local: "https://api.howone.dev",
|
|
349
|
+
dev: "https://api.howone.dev",
|
|
350
|
+
prod: "https://api.howone.ai"
|
|
351
351
|
};
|
|
352
352
|
var detectEnvironmentFromHostname = () => {
|
|
353
353
|
try {
|
|
@@ -391,6 +391,7 @@ var UnifiedAuthService = class {
|
|
|
391
391
|
};
|
|
392
392
|
const stateString = encodeURIComponent(JSON.stringify(state));
|
|
393
393
|
try {
|
|
394
|
+
console.log("Using API_BASE_URL:", this.API_BASE_URL);
|
|
394
395
|
const response = await fetch(`${this.API_BASE_URL}/api/auth/google?state=${stateString}`);
|
|
395
396
|
const data = await response.json();
|
|
396
397
|
if (!data.data.success || !data.data.authUrl) {
|
|
@@ -454,11 +455,11 @@ var UnifiedAuthService = class {
|
|
|
454
455
|
window.location.origin,
|
|
455
456
|
this.API_BASE_URL,
|
|
456
457
|
// 使用当前环境的 API_BASE_URL
|
|
457
|
-
"https://
|
|
458
|
-
"https://
|
|
458
|
+
"https://api.howone.dev",
|
|
459
|
+
"https://api.howone.ai"
|
|
459
460
|
];
|
|
460
461
|
const isValidOrigin = validOrigins.some(
|
|
461
|
-
(origin) => event.origin === origin || event.origin.includes("localhost") || event.origin.includes("127.0.0.1") || event.origin.includes("fly.dev")
|
|
462
|
+
(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")
|
|
462
463
|
);
|
|
463
464
|
if (!isValidOrigin) {
|
|
464
465
|
return;
|