@bardioc/app-sdk 0.4.6 → 0.4.7

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.
@@ -4,8 +4,6 @@ export interface DevAuthProxyOptions {
4
4
  apiBaseUrl: string;
5
5
  /** Dev secret copied from the backend. */
6
6
  devSecret: string;
7
- /** App slug stamped as `X-App-ID`, mirroring how the host identifies iframe apps. */
8
- appId?: string;
9
7
  /** Optional CORS origin (e.g. `*`). */
10
8
  allowOrigin?: string;
11
9
  }
package/dist/dev-proxy.js CHANGED
@@ -33,7 +33,7 @@ function addDevSecretHeader(req, headers, devSecret) {
33
33
  }
34
34
  export function createDevAuthProxyHandler(options) {
35
35
  const apiBaseUrl = normalizeApiBaseUrl(options.apiBaseUrl);
36
- const { devSecret, allowOrigin, appId } = options;
36
+ const { devSecret, allowOrigin } = options;
37
37
  return async (req, res) => {
38
38
  const url = new URL(req.url ?? '/', `http://${req.headers.host ?? 'localhost'}`);
39
39
  if (req.method === 'OPTIONS') {
@@ -74,11 +74,9 @@ export function createDevAuthProxyHandler(options) {
74
74
  }
75
75
  }
76
76
  addDevSecretHeader(req, headers, devSecret);
77
- // The host stamps X-App-ID from its own registration data, never from the app — the
78
- // dev proxy does the same with the configured app slug.
79
- if (appId) {
80
- headers.set('X-App-ID', appId);
81
- }
77
+ // Dev auth is dev-secret only: never forward X-App-Id, so the BFF app-token
78
+ // exchange (which would also demand X-Scope-ID) can never be triggered here.
79
+ headers.delete('X-App-Id');
82
80
  // BFF rejects /bardioc/ calls without this CSRF marker header; stamp it like the host does.
83
81
  headers.set('X-Requested-With', 'XMLHttpRequest');
84
82
  let body;
package/dist/vite.js CHANGED
@@ -260,7 +260,6 @@ export function bardiocDevAuth(options) {
260
260
  proxyOptions = {
261
261
  apiBaseUrl: env.API_BASE_URL,
262
262
  devSecret: env.DEV_SECRET,
263
- appId: options.appName,
264
263
  };
265
264
  }
266
265
  const handler = createDevAuthProxyHandler(proxyOptions);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bardioc/app-sdk",
3
- "version": "0.4.6",
3
+ "version": "0.4.7",
4
4
  "description": "SDK for building apps for the Bardioc OS",
5
5
  "license": "MIT",
6
6
  "private": false,