@howone/sdk 0.1.14 → 0.1.15
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.mjs
CHANGED
|
@@ -254,7 +254,7 @@ var FloatingButton = ({
|
|
|
254
254
|
// src/services/unified-oauth.ts
|
|
255
255
|
var UnifiedAuthService = class {
|
|
256
256
|
constructor() {
|
|
257
|
-
this.API_BASE_URL = "http://localhost:
|
|
257
|
+
this.API_BASE_URL = "http://localhost:3002";
|
|
258
258
|
}
|
|
259
259
|
/**
|
|
260
260
|
* 初始化 Google 登录流程
|
|
@@ -330,7 +330,7 @@ var UnifiedAuthService = class {
|
|
|
330
330
|
const messageHandler = (event) => {
|
|
331
331
|
const validOrigins = [
|
|
332
332
|
window.location.origin,
|
|
333
|
-
"http://localhost:
|
|
333
|
+
"http://localhost:3002"
|
|
334
334
|
];
|
|
335
335
|
const isValidOrigin = validOrigins.some(
|
|
336
336
|
(origin) => event.origin === origin || event.origin.includes("localhost") || event.origin.includes("127.0.0.1") || event.origin.includes("fly.dev")
|
|
@@ -993,7 +993,7 @@ function setupClearUrlTokenListener(opts) {
|
|
|
993
993
|
|
|
994
994
|
// src/services/index.ts
|
|
995
995
|
var request = new request_default({
|
|
996
|
-
baseURL: "http://localhost:
|
|
996
|
+
baseURL: "http://localhost:3002/api",
|
|
997
997
|
timeout: 6e4,
|
|
998
998
|
interceptors: {
|
|
999
999
|
requestInterceptor: (config) => {
|
|
@@ -1219,7 +1219,7 @@ function createClient(opts) {
|
|
|
1219
1219
|
if (typeof window === "undefined") return;
|
|
1220
1220
|
const loc = redirect || window.location.href;
|
|
1221
1221
|
try {
|
|
1222
|
-
const root = getAuthRoot() || "http://localhost:
|
|
1222
|
+
const root = getAuthRoot() || "http://localhost:3002";
|
|
1223
1223
|
const authUrl = new URL("/auth", String(root));
|
|
1224
1224
|
authUrl.searchParams.set("redirect_uri", String(loc));
|
|
1225
1225
|
if (opts?.projectId) authUrl.searchParams.set("project_id", String(opts.projectId));
|
|
@@ -1227,7 +1227,7 @@ function createClient(opts) {
|
|
|
1227
1227
|
} catch {
|
|
1228
1228
|
const encoded = encodeURIComponent(String(loc));
|
|
1229
1229
|
const pid = opts?.projectId ? `&project_id=${encodeURIComponent(String(opts.projectId))}` : "";
|
|
1230
|
-
const root = "http://localhost:
|
|
1230
|
+
const root = "http://localhost:3002";
|
|
1231
1231
|
window.location.href = `${root}/auth?redirect_uri=${encoded}${pid}`;
|
|
1232
1232
|
}
|
|
1233
1233
|
},
|
|
@@ -1646,7 +1646,7 @@ var HowoneAuthClient = class {
|
|
|
1646
1646
|
}
|
|
1647
1647
|
// Simple redirect-based login trigger (consumer can override)
|
|
1648
1648
|
login() {
|
|
1649
|
-
const root = getAuthRoot() || "http://localhost:
|
|
1649
|
+
const root = getAuthRoot() || "http://localhost:3002";
|
|
1650
1650
|
try {
|
|
1651
1651
|
const loc = window.location.href;
|
|
1652
1652
|
const authUrl = new URL("/auth", String(root));
|