equinor / equinor/fusion-framework

Reconsider MsalModule proxy-provider fallback once all apps migrate to v4

Open
#5,114 0 comments 0 reactions 0 assignees View on GitHub
module:msal tech-debt
Dominant language
TypeScript
Stars
10
Forks
10
Avg merge
19h 40m
Merged PRs (30d)
150

Description

## Context

In `packages/modules/msal/src/module.ts`, when creating a proxy provider from a host (parent) provider fails, the MSAL module currently falls back to returning the host provider directly rather than throwing, to avoid breaking apps during the v2→v4 migration period:

```ts
try {
const proxyProvider = hostProvider.createProxyProvider(config.version);
return proxyProvider;
} catch (error) {
console.error('MsalModule::Failed to create proxy provider', error);
// Fallback to host provider to prevent app breakage during migration
// TODO: Consider throwing error instead once all apps are migrated to v4
return hostProvider;
}
```

## Task

Once all consumer apps have migrated to MSAL v4, revisit this fallback and consider throwing the error instead of silently falling back to the host provider (which may not implement the expected version-specific API).

Contributor guide

Open the contributing guide

Research direction

Start in packages/modules/msal/src/module.ts and review the proxy-provider creation try/catch and its migration comments. First confirm whether all consumer apps have migrated to MSAL v4, then determine the appropriate behavior for a proxy-provider creation failure. Done means the fallback decision is resolved and the module behavior reflects the post-migration requirement.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
authentication
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.