@microsoft/rayfin-auth-provider-fabric 1.35.0-beta.0 → 1.36.0-alpha.1588

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,13 +9,7 @@ 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.
12
+ * edog lacks SecureItemEmbed, so it falls back to the full-portal deep-link.
19
13
  *
20
14
  * @param options - Auth options (workspace/project IDs, portal URL).
21
15
  * @returns Fully constructed broker URL.
package/dist/brokerUrl.js CHANGED
@@ -1,3 +1,12 @@
1
+ /** edog (dogfood) portal domain; unlike prod/daily/dxt it lacks SecureItemEmbed. */
2
+ const EDOG_PORTAL_DOMAIN_SUFFIX = '.analysis-df.windows.net';
3
+ /** `true` when `host` is the edog portal (`*.analysis-df.windows.net`). */
4
+ function isEdogPortal(host) {
5
+ return host
6
+ .toLowerCase()
7
+ .replace(/\.$/, '')
8
+ .endsWith(EDOG_PORTAL_DOMAIN_SUFFIX);
9
+ }
1
10
  /**
2
11
  * Constructs the broker launch URL for the chromeless SecureItemEmbed view.
3
12
  *
@@ -8,13 +17,7 @@
8
17
  * PKCE parameters are no longer included in the URL — they are delivered to
9
18
  * the extension via the postMessage challenge flow (`brokeredAuth.challenge`).
10
19
  *
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.
20
+ * edog lacks SecureItemEmbed, so it falls back to the full-portal deep-link.
18
21
  *
19
22
  * @param options - Auth options (workspace/project IDs, portal URL).
20
23
  * @returns Fully constructed broker URL.
@@ -22,27 +25,21 @@
22
25
  export function buildBrokerUrl(options) {
23
26
  const portalUrl = new URL(options.fabricPortalUrl);
24
27
  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') {
28
+ // edog lacks SecureItemEmbed: use the full-portal deep-link. Query params
29
+ // are preserved since only the path is rewritten.
30
+ if (isEdogPortal(portalUrl.hostname)) {
31
31
  portalUrl.pathname =
32
32
  `${basePath}/groups/${encodeURIComponent(options.workspaceId)}` +
33
33
  `/appbackends/${encodeURIComponent(options.projectId)}/brokeredauth`;
34
34
  return portalUrl.toString();
35
35
  }
36
- // Use the chromeless SecureItemEmbed path instead of the full portal
37
- // deep-link so the popup renders without Fabric navigation chrome.
36
+ // Chromeless SecureItemEmbed path (no Fabric navigation chrome).
38
37
  portalUrl.pathname = `${basePath}/secureItemEmbed`;
39
38
  // Artifact identification for SecureItemEmbed
40
39
  portalUrl.searchParams.set('workspaceId', options.workspaceId);
41
40
  portalUrl.searchParams.set('itemType', 'AppBackend');
42
41
  portalUrl.searchParams.set('itemId', options.projectId);
43
- // Route the extension to the dedicated BrokeredAuthPage.
44
- // PKCE parameters are delivered via postMessage (brokeredAuth.challenge),
45
- // not through the URL, so only the path is needed here.
42
+ // Route the extension to the BrokeredAuthPage; PKCE goes via postMessage.
46
43
  portalUrl.searchParams.set('extensionPath', '/brokeredauth');
47
44
  return portalUrl.toString();
48
45
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@microsoft/rayfin-auth-provider-fabric",
3
- "version": "1.35.0-beta.0",
3
+ "version": "1.36.0-alpha.1588",
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.35.0-beta.0",
17
- "@microsoft/fabric-embedded-host": "1.35.0-beta.0",
18
- "@microsoft/rayfin-lib": "1.35.0-beta.0"
16
+ "@microsoft/fabric-embedded-host": "1.36.0-alpha.1588",
17
+ "@microsoft/rayfin-auth": "1.36.0-alpha.1588",
18
+ "@microsoft/rayfin-lib": "1.36.0-alpha.1588"
19
19
  },
20
20
  "devDependencies": {
21
21
  "typescript": "^5.8.3",