@microsoft/rayfin-auth-provider-fabric 1.34.0 → 1.35.0-alpha.1276

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.
@@ -9,6 +9,14 @@ import type { FabricAuthOptions } from './types.js';
9
9
  * PKCE parameters are no longer included in the URL — they are delivered to
10
10
  * the extension via the postMessage challenge flow (`brokeredAuth.challenge`).
11
11
  *
12
+ * **Local-manifest debugging:** when `fabricPortalUrl` carries
13
+ * `debug.useLocalManifests=1`, the chromeless SecureItemEmbed host is bypassed
14
+ * in favor of the full-portal artifact deep-link. The SecureItemEmbed host
15
+ * does not propagate `debug.useLocalManifests` to the loaded extension
16
+ * manifest, whereas the portal shell honors it — so this fallback renders the
17
+ * usual portal chrome but loads local manifests. PKCE/state are still
18
+ * delivered via postMessage in both cases, so no auth params are added here.
19
+ *
12
20
  * @param options - Auth options (workspace/project IDs, portal URL).
13
21
  * @returns Fully constructed broker URL.
14
22
  */
package/dist/brokerUrl.js CHANGED
@@ -8,14 +8,33 @@
8
8
  * PKCE parameters are no longer included in the URL — they are delivered to
9
9
  * the extension via the postMessage challenge flow (`brokeredAuth.challenge`).
10
10
  *
11
+ * **Local-manifest debugging:** when `fabricPortalUrl` carries
12
+ * `debug.useLocalManifests=1`, the chromeless SecureItemEmbed host is bypassed
13
+ * in favor of the full-portal artifact deep-link. The SecureItemEmbed host
14
+ * does not propagate `debug.useLocalManifests` to the loaded extension
15
+ * manifest, whereas the portal shell honors it — so this fallback renders the
16
+ * usual portal chrome but loads local manifests. PKCE/state are still
17
+ * delivered via postMessage in both cases, so no auth params are added here.
18
+ *
11
19
  * @param options - Auth options (workspace/project IDs, portal URL).
12
20
  * @returns Fully constructed broker URL.
13
21
  */
14
22
  export function buildBrokerUrl(options) {
15
23
  const portalUrl = new URL(options.fabricPortalUrl);
24
+ const basePath = portalUrl.pathname.replace(/\/$/, '');
25
+ // Local-manifest debugging bypasses the chromeless SecureItemEmbed host,
26
+ // which does not honor `debug.useLocalManifests=1`. Fall back to the
27
+ // full-portal artifact deep-link (usual portal chrome) so local manifests
28
+ // load. The `debug.useLocalManifests` flag comes from `fabricPortalUrl` and
29
+ // is preserved automatically since only the path is rewritten.
30
+ if (portalUrl.searchParams.get('debug.useLocalManifests') === '1') {
31
+ portalUrl.pathname =
32
+ `${basePath}/groups/${encodeURIComponent(options.workspaceId)}` +
33
+ `/appbackends/${encodeURIComponent(options.projectId)}/brokeredauth`;
34
+ return portalUrl.toString();
35
+ }
16
36
  // Use the chromeless SecureItemEmbed path instead of the full portal
17
37
  // deep-link so the popup renders without Fabric navigation chrome.
18
- const basePath = portalUrl.pathname.replace(/\/$/, '');
19
38
  portalUrl.pathname = `${basePath}/secureItemEmbed`;
20
39
  // Artifact identification for SecureItemEmbed
21
40
  portalUrl.searchParams.set('workspaceId', options.workspaceId);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@microsoft/rayfin-auth-provider-fabric",
3
- "version": "1.34.0",
3
+ "version": "1.35.0-alpha.1276",
4
4
  "description": "Fabric brokered authentication provider for Rayfin SDK",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -13,9 +13,9 @@
13
13
  ],
14
14
  "type": "module",
15
15
  "dependencies": {
16
- "@microsoft/rayfin-auth": "1.34.0",
17
- "@microsoft/fabric-embedded-host": "1.34.0",
18
- "@microsoft/rayfin-lib": "1.34.0"
16
+ "@microsoft/rayfin-auth": "1.35.0-alpha.1276",
17
+ "@microsoft/rayfin-lib": "1.35.0-alpha.1276",
18
+ "@microsoft/fabric-embedded-host": "1.35.0-alpha.1276"
19
19
  },
20
20
  "devDependencies": {
21
21
  "typescript": "^5.8.3",