@howone/sdk 0.1.14 → 0.1.16
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 +6 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -309,7 +309,7 @@ var FloatingButton = ({
|
|
|
309
309
|
// src/services/unified-oauth.ts
|
|
310
310
|
var UnifiedAuthService = class {
|
|
311
311
|
constructor() {
|
|
312
|
-
this.API_BASE_URL = "
|
|
312
|
+
this.API_BASE_URL = "https://create-x-backend-dev";
|
|
313
313
|
}
|
|
314
314
|
/**
|
|
315
315
|
* 初始化 Google 登录流程
|
|
@@ -385,7 +385,7 @@ var UnifiedAuthService = class {
|
|
|
385
385
|
const messageHandler = (event) => {
|
|
386
386
|
const validOrigins = [
|
|
387
387
|
window.location.origin,
|
|
388
|
-
"
|
|
388
|
+
"https://create-x-backend-dev"
|
|
389
389
|
];
|
|
390
390
|
const isValidOrigin = validOrigins.some(
|
|
391
391
|
(origin) => event.origin === origin || event.origin.includes("localhost") || event.origin.includes("127.0.0.1") || event.origin.includes("fly.dev")
|
|
@@ -1048,7 +1048,7 @@ function setupClearUrlTokenListener(opts) {
|
|
|
1048
1048
|
|
|
1049
1049
|
// src/services/index.ts
|
|
1050
1050
|
var request = new request_default({
|
|
1051
|
-
baseURL: "
|
|
1051
|
+
baseURL: "https://create-x-backend-dev/api",
|
|
1052
1052
|
timeout: 6e4,
|
|
1053
1053
|
interceptors: {
|
|
1054
1054
|
requestInterceptor: (config) => {
|
|
@@ -1274,7 +1274,7 @@ function createClient(opts) {
|
|
|
1274
1274
|
if (typeof window === "undefined") return;
|
|
1275
1275
|
const loc = redirect || window.location.href;
|
|
1276
1276
|
try {
|
|
1277
|
-
const root = getAuthRoot() || "
|
|
1277
|
+
const root = getAuthRoot() || "https://create-x-backend-dev";
|
|
1278
1278
|
const authUrl = new URL("/auth", String(root));
|
|
1279
1279
|
authUrl.searchParams.set("redirect_uri", String(loc));
|
|
1280
1280
|
if (opts?.projectId) authUrl.searchParams.set("project_id", String(opts.projectId));
|
|
@@ -1282,7 +1282,7 @@ function createClient(opts) {
|
|
|
1282
1282
|
} catch {
|
|
1283
1283
|
const encoded = encodeURIComponent(String(loc));
|
|
1284
1284
|
const pid = opts?.projectId ? `&project_id=${encodeURIComponent(String(opts.projectId))}` : "";
|
|
1285
|
-
const root = "
|
|
1285
|
+
const root = "https://create-x-backend-dev";
|
|
1286
1286
|
window.location.href = `${root}/auth?redirect_uri=${encoded}${pid}`;
|
|
1287
1287
|
}
|
|
1288
1288
|
},
|
|
@@ -1701,7 +1701,7 @@ var HowoneAuthClient = class {
|
|
|
1701
1701
|
}
|
|
1702
1702
|
// Simple redirect-based login trigger (consumer can override)
|
|
1703
1703
|
login() {
|
|
1704
|
-
const root = getAuthRoot() || "
|
|
1704
|
+
const root = getAuthRoot() || "https://create-x-backend-dev";
|
|
1705
1705
|
try {
|
|
1706
1706
|
const loc = window.location.href;
|
|
1707
1707
|
const authUrl = new URL("/auth", String(root));
|