Skip to content

Commit 655ab0e

Browse files
committed
chore(changeset): msal patch - internal fix for proxy provider wiring
1 parent 184438f commit 655ab0e

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"@equinor/fusion-framework-module-msal": patch
3+
---
4+
5+
Internal: fix proxy provider creation to avoid incorrect provider wiring in v2 `create-proxy-provider.ts`.
6+
7+
This change corrects internal wiring used when creating the proxy provider in the v2 implementation. No public API changes.

packages/modules/msal/src/v2/create-proxy-provider.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ export function createProxyProvider(provider: IMsalProvider): IMsalProvider_v2 {
8989
scopes: string[];
9090
account?: AccountInfo_v2;
9191
}) => {
92-
const request = isRequestV4(req) ? req : { scopes: req.scopes, account: req.account };
93-
const result = await target.acquireToken({ request });
92+
const args = isRequestV4(req) ? req : { request: { scopes: req.scopes, account: req.account } };
93+
const result = await target.acquireToken(args);
9494

9595
// Convert null to undefined for v2 compatibility
9696
return result || undefined;
@@ -103,8 +103,8 @@ export function createProxyProvider(provider: IMsalProvider): IMsalProvider_v2 {
103103
scopes: string[];
104104
account?: AccountInfo_v2;
105105
}) => {
106-
const request = isRequestV4(req) ? req : { scopes: req.scopes, account: req.account };
107-
return await target.acquireAccessToken({ request });
106+
const args = isRequestV4(req) ? req : { request: { scopes: req.scopes, account: req.account } };
107+
return await target.acquireAccessToken(args);
108108
};
109109
return acquireAccessToken;
110110
}

0 commit comments

Comments
 (0)