4.0.7 • Published 4 months ago

@equinor/fusion-framework-module-msal v4.0.7

Weekly downloads
-
License
ISC
Repository
github
Last release
4 months ago

MSAL mod

This modules provides configuration and utilities for working with the Microsoft Authentication Library (MSAL) in Fusion.

Configuration

!IMPORTANT The @equinor/fusion-framework-app enables this package by default, so applications using the app package do not need to enable this package.

// enable the module
import { enableMsal } from '@equinor/fusion-framework-module-msal';

export const configure = (configurator: IModulesConfigurator) => {
  enableMsal(configurator);
};

!WARNING Only the first ancestor should configure the module. All sub scopes will inherit the configuration from the first ancestor.

import { enableMsal } from '@equinor/fusion-framework-module-msal';

const myConfigurator = new ModulesConfigurator();

const msalConfig: AuthConfig = { tenantId: 'your-tenant', clientId: 'your-client' callbackUrl: 'your-callback-url' };

// Enable MSAL enableMsal(myConfigurator, (msalConfigurator) => msalConfigurator.setClientConfig(msalConfig));

// Alternatively import { configureMsal } from '@equinor/fusion-framework-module-msal'; myConfigurator.addConfig(configureMsal(msalConfigurator => { configurator.setClientConfig(msalConfig); }));

// Native MSAL configuration import { module } from '@azure/msal-browser'; myConfigurator.addConfig({ module: module, config: (msalConfigurator) => msalConfigurator.setClientConfig(msalConfig) }

### Interoperability with MSAL versions

The provider proxy generation is by default set to `MsalModuleVersion.Latest`, which will be resolved by the ancestor module. If you want to force a specific version, you can set the version in the configuration.

> [!NOTE]
> this should not be necessary in most cases and only done by understanding the inner workings of the module, but can be done in a transition phase._

```ts
import { MsalModuleVersion } from '@equinor/fusion-framework-module-msal';
enableMsal(myConfigurator, (msalConfigurator) => {
  msalConfigurator.setClientConfig(msalConfig);
  msalConfigurator.setVersion(MsalModuleVersion.V2);
});

Major versions

V4

The module change to use module hoisting, which means that sub modules instances will proxy the parent module instance. This means that the module instance will be shared between all instances of the module.

This is a breaking change since this module used to support multiple MSAL clients (multi tenant, multi authority) in the same scoped instance. This is no longer supported, due to the way @azure/msal-browser uses a shared cache.

This version still uses @azure/msal-browser@^2, but enables

4.0.7-next.0

5 months ago

4.0.7-next.1

5 months ago

4.0.5

5 months ago

4.0.4

5 months ago

4.0.7

4 months ago

4.0.6

5 months ago

4.0.1

8 months ago

4.0.0

8 months ago

4.0.3

6 months ago

4.0.2

7 months ago

3.1.3

1 year ago

3.1.2

1 year ago

3.1.1

1 year ago

3.1.5

1 year ago

3.1.4

1 year ago

3.1.0

2 years ago

3.0.10

2 years ago

3.0.9

2 years ago

3.0.8

2 years ago

3.0.7

2 years ago

3.0.6

2 years ago

3.0.5

2 years ago

2.0.1

3 years ago

3.0.4

2 years ago

3.0.3

2 years ago

3.0.2

2 years ago

3.0.1

2 years ago

3.0.0

3 years ago

3.0.1-next.0

2 years ago

3.0.1-next.1

2 years ago

1.0.22

3 years ago

2.0.0

3 years ago

1.0.23

3 years ago

1.0.19

3 years ago

1.0.2

3 years ago

1.0.18

3 years ago

1.0.1

3 years ago

1.0.17

3 years ago

1.0.16

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.0-alpha.0

3 years ago

1.0.21

3 years ago

1.0.20

3 years ago

1.0.1-next.1

3 years ago

1.0.11

3 years ago

1.0.10

3 years ago

1.0.15

3 years ago

0.4.1

3 years ago

1.0.14

3 years ago

1.0.13

3 years ago

1.0.12

3 years ago

0.4.2

3 years ago

0.1.12

3 years ago

0.1.13

3 years ago

0.1.14

3 years ago

0.1.15

3 years ago

0.3.0

3 years ago

0.3.2

3 years ago

0.3.1

3 years ago

0.1.20

3 years ago

0.1.21

3 years ago

0.1.22

3 years ago

0.1.23

3 years ago

0.1.24

3 years ago

0.2.0

3 years ago

0.1.16

3 years ago

0.1.17

3 years ago

0.1.18

3 years ago

0.1.19

3 years ago

0.4.0

3 years ago

0.1.10

3 years ago

0.1.11

3 years ago

0.1.8

4 years ago

0.1.9

4 years ago

0.1.7

4 years ago

0.1.6

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago

0.1.0-beta.15

4 years ago

0.1.0-beta.14

4 years ago

0.1.0-beta.12

4 years ago

0.1.0-beta.11

4 years ago

0.1.0-beta.9

4 years ago

0.1.0-beta.7

4 years ago

0.1.0-beta.4

4 years ago

0.1.0-beta.3

4 years ago

0.1.0-beta.2

4 years ago

0.1.0-beta.1

4 years ago

0.1.0-beta.0

4 years ago

0.1.0-alpha.12

4 years ago

0.1.0-alpha.11

4 years ago

0.1.0-alpha.10

4 years ago

0.1.0-alpha.9

4 years ago

0.1.0-alpha.7

4 years ago

0.1.0-alpha.6

4 years ago

0.1.0-alpha.5

4 years ago

0.1.0-alpha.4

4 years ago

0.1.0-alpha.3

4 years ago

0.1.0-alpha.2

4 years ago

0.1.0-alpha.1

4 years ago

0.1.0-alpha.0

4 years ago