@azure/msal-node-extensions 1.0.0-alpha.10 → 1.0.0-alpha.14

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.
Files changed (33) hide show
  1. package/CHANGELOG.json +102 -0
  2. package/{changelog.md → CHANGELOG.md} +105 -71
  3. package/LICENSE +21 -21
  4. package/README.md +192 -191
  5. package/binding.gyp +29 -29
  6. package/dist/msal-node-extensions.cjs.development.js +4 -1
  7. package/dist/msal-node-extensions.cjs.development.js.map +1 -1
  8. package/dist/msal-node-extensions.cjs.production.min.js +1 -1
  9. package/dist/msal-node-extensions.cjs.production.min.js.map +1 -1
  10. package/dist/msal-node-extensions.esm.js +4 -1
  11. package/dist/msal-node-extensions.esm.js.map +1 -1
  12. package/package.json +18 -6
  13. package/src/dpapi-addon/Dpapi.ts +17 -12
  14. package/src/dpapi-addon/dpapi_addon.h +6 -6
  15. package/src/dpapi-addon/dpapi_not_supported.cpp +19 -19
  16. package/src/dpapi-addon/dpapi_win.cpp +114 -114
  17. package/src/dpapi-addon/main.cpp +32 -32
  18. package/src/error/PersistenceError.ts +101 -101
  19. package/src/index.ts +16 -16
  20. package/src/lock/CrossPlatformLock.ts +89 -89
  21. package/src/lock/CrossPlatformLockOptions.ts +15 -15
  22. package/src/persistence/BasePersistence.ts +41 -41
  23. package/src/persistence/DataProtectionScope.ts +20 -20
  24. package/src/persistence/FilePersistence.ts +140 -140
  25. package/src/persistence/FilePersistenceWithDataProtection.ts +92 -92
  26. package/src/persistence/IPersistence.ts +17 -17
  27. package/src/persistence/IPersistenceConfiguration.ts +14 -14
  28. package/src/persistence/KeychainPersistence.ts +86 -86
  29. package/src/persistence/LibSecretPersistence.ts +87 -87
  30. package/src/persistence/PersistenceCachePlugin.ts +106 -106
  31. package/src/persistence/PersistenceCreator.ts +73 -73
  32. package/src/utils/Constants.ts +62 -62
  33. package/src/utils/Environment.ts +99 -99
package/README.md CHANGED
@@ -1,192 +1,193 @@
1
- # Microsoft Authentication Extensions for Node
2
-
3
- ![npm (scoped)](https://img.shields.io/npm/v/@azure/msal-node-extensions)
4
- ![npm](https://img.shields.io/npm/dw/@azure/msal-node-extensions)
5
-
6
- | <a href="https://docs.microsoft.com/azure/active-directory/develop/tutorial-v2-react" target="blank">Getting Started</a> | <a href="https://aka.ms/aaddevv2" target="_blank">AAD Docs</a> | <a href="https://azuread.github.io/microsoft-authentication-library-for-js/ref/modules/_azure_msal_react.html" target="_blank">Library Reference</a> | <a href="https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/samples" target="blank">Samples</a>
7
- |--- | --- | --- | --- |
8
-
9
- 1. [About](#about)
10
- - [Goals](#goals)
11
- - [Non-Goals](#non-goals)
12
- 1. [FAQ](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/extensions/docs/faq.md)
13
- 1. [Prerequisites](#prerequisites)
14
- 1. [Installation](#installation)
15
- 1. [Usage](#usage)
16
- - [Getting Started](#getting-started)
17
- - [Security Boundary](#security-boundary)
18
- 1. [Build and Test](#build-and-test)
19
- - [Build package](#building-the-package-locally)
20
- - [Test package](#running-tests)
21
- 1. [Samples](#samples)
22
- 1. [Security Reporting](#security-reporting)
23
- 1. [License](#license)
24
- 1. [Contributing](#contributing)
25
- 1. [Code of Conduct](#we-value-and-adhere-to-the-microsoft-open-source-code-of-conduct)
26
-
27
- ## About
28
- The Microsoft Authentication Extensions for Node offers secure mechanisms for client applications to perform cross-platform token cache serialization and persistence. It gives additional support to the Microsoft Authentication Library for Node (MSAL).
29
-
30
- [MSAL Node](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-node) supports an in-memory cache by default and provides the ICachePlugin interface to perform cache serialization, but does not provide a default way of storing the token cache to disk. Microsoft authentication extensions for node is default implementation for persisting cache to disk across different platforms.
31
-
32
- Supported platforms are Windows, Mac and Linux:
33
-
34
- - Windows - DPAPI is used for encryption.
35
- - MAC - The MAC KeyChain is used.
36
- - Linux - LibSecret is used for storing to "Secret Service".
37
-
38
- > Note: It is recommended to use this library for cache persistence support for Public client applications such as Desktop apps only. In web applications, this may lead to scale and performance issues. Web applications are recommended to persist the cache in session.
39
-
40
- ### Goals
41
- * Provide a robust, secure and configurable token cache persistence implementation across Windows, Mac and Linux for public client applications (rich clients, CLI applications etc.)
42
- * Token cache storage can be accessed by multiple processes concurrently.
43
-
44
- ### Non Goals
45
- * This implementation is not suitable for web app / web api scenarios, where storing the cache should be done in memory, Redis, Sql Server etc. Have a look at the [web samples](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/samples/msal-node-samples) for server-side implementations.
46
-
47
- ## Prerequisites
48
-
49
- The extensions contain prebuild binaries.
50
- [node-gyp](https://github.com/nodejs/node-gyp) is used to compile addons for accessing system APIs. Installation requirements are listed on the [node-gyp README](https://github.com/nodejs/node-gyp#installation)
51
-
52
- On linux, the library uses `libsecret` so you may need to install it. Depending on your distribution, you will need to run the following command:
53
-
54
- - Debian/Ubuntu: `sudo apt-get install libsecret-1-dev`
55
- - Red Hat-based: `sudo yum install libsecret-devel`
56
- - Arch Linux: sudo `pacman -S libsecret`
57
-
58
- ## Installation
59
-
60
- The `msal-node-extensions` package is available on NPM.
61
-
62
- ```bash
63
- npm i @azure/msal-node-extensions --save
64
- ```
65
- ## Usage
66
- ### Getting started
67
- Here is a code snippet on how to configure the token cache.
68
-
69
- ```js
70
- const {
71
- DataProtectionScope,
72
- Environment,
73
- PersistenceCreator,
74
- PersistenceCachePlugin,
75
- } = require("@azure/msal-node-extensions");
76
-
77
- // You can use the helper functions provided through the Environment class to construct your cache path
78
- // The helper functions provide consistent implementations across Windows, Mac and Linux.
79
- const cachePath = path.join(Environment.getUserRootDirectory(), "./cache.json");
80
-
81
- const persistenceConfiguration = {
82
- cachePath,
83
- dataProtectionScope: DataProtectionScope.CurrentUser,
84
- serviceName: "<SERVICE-NAME>",
85
- accountName: "<ACCOUNT-NAME>",
86
- usePlaintextFileOnLinux: false,
87
- }
88
-
89
- // The PersistenceCreator obfuscates a lot of the complexity by doing the following actions for you :-
90
- // 1. Detects the environment the application is running on and initializes the right persistence instance for the environment.
91
- // 2. Performs persistence validation for you.
92
- // 3. Performs any fallbacks if necessary.
93
- PersistenceCreator
94
- .createPersistence(persistenceConfiguration)
95
- .then(async (persistence) => {
96
- const publicClientConfig = {
97
- auth: {
98
- clientId: "<CLIENT-ID>",
99
- authority: "<AUTHORITY>",
100
- },
101
-
102
- // This hooks up the cross-platform cache into MSAL
103
- cache: {
104
- cachePlugin: new PersistenceCachePlugin(persistence)
105
- }
106
- };
107
-
108
- const pca = new msal.PublicClientApplication(publicClientConfig);
109
-
110
- // Use the public client application as required...
111
- });
112
- ```
113
-
114
- All the arguments for the persistence configuration are explained below:
115
- | Field Name | Description | Required For |
116
- | ---------- | ----------- | ------------ |
117
- | cachePath | This is the path to the lock file the library uses to synchronize the reads and the writes | Windows, Mac and Linux |
118
- | dataProtectionScope | Specifies the scope of the data protection on Windows either the current user or the local machine. | Windows |
119
- | serviceName | This specifies the service name to be used on Mac and/or Linux | Mac and Linux |
120
- | accountName | This specifies the account name to be used on Mac and/or Linux | Mac and Linux |
121
- | usePlaintextFileOnLinux | This is a flag to default to plain text on linux if libsecret fails. Defaults to `false` | Linux |
122
-
123
- ### Security boundary
124
- On Windows and Linux, the token cache is scoped to the user session, i.e. all applications running on behalf of the user can access the cache. Mac offers a more restricted scope, ensuring that only the application that created the cache can access it, and prompting the user if others apps want access.
125
-
126
- ## Build and Test
127
-
128
- If you intend to contribute to the library visit the [`contributing section`](#contributing) for even more information on how.
129
-
130
- ### Building the package locally
131
-
132
- To build the `@azure/msal-node-extensions` library, you can do the following:
133
-
134
- ```bash
135
- // Install dev dependencies from root of repo
136
- npm install
137
- // Change to the msal-node-extensions package directory
138
- cd extensions/msal-node-extensions
139
- // To run build only for node-extensions package
140
- npm run build
141
- ```
142
-
143
- To build both the `@azure/msal-node-extensions` library and `@azure/msal-common` libraries, you can do the following:
144
-
145
- ```bash
146
- // Install dev dependencies from root of repo
147
- npm install
148
- // Change to the msal-react package directory
149
- cd lib/msal-node-extensions/
150
- // To run build for the common package
151
- npm run build:common
152
- // To run build for the msal-node-extensions package
153
- npm run build
154
- ```
155
-
156
- ### Running Tests
157
-
158
- `@azure/msal-node-extensions` uses [jest](https://jestjs.io/) to run unit tests and coverage.
159
-
160
- ```bash
161
- // To run tests
162
- npm test
163
- ```
164
-
165
- ## Samples
166
- Have a look at a [simple auth-code app](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/extensions/samples/msal-node-extensions) using this token cache. We use this for testing on Windows, Mac and Linux.
167
-
168
- ## Security Reporting
169
-
170
- If you find a security issue with our libraries or services please report it to [secure@microsoft.com](mailto:secure@microsoft.com) with as much detail as possible. Your submission may be eligible for a bounty through the [Microsoft Bounty](http://aka.ms/bugbounty) program. Please do not post security issues to GitHub Issues or any other public site. We will contact you shortly upon receiving the information. We encourage you to get notifications of when security incidents occur by visiting [this page](https://technet.microsoft.com/security/dd252948) and subscribing to Security Advisory Alerts.
171
-
172
- ## License
173
-
174
- Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License.
175
-
176
- ## Contributing
177
-
178
- This project welcomes contributions and suggestions. Most contributions require you to agree to a
179
- Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us
180
- the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.
181
-
182
- When you submit a pull request, a CLA bot will automatically determine whether you need to provide
183
- a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions
184
- provided by the bot. You will only need to do this once across all repos using our CLA.
185
-
186
- This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
187
- For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
188
- contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
189
-
190
- ## We Value and Adhere to the Microsoft Open Source Code of Conduct
191
-
1
+ # Microsoft Authentication Extensions for Node
2
+
3
+ ![npm (scoped)](https://img.shields.io/npm/v/@azure/msal-node-extensions)
4
+ ![npm](https://img.shields.io/npm/dw/@azure/msal-node-extensions)
5
+
6
+ | <a href="https://docs.microsoft.com/azure/active-directory/develop/tutorial-v2-react" target="blank">Getting Started</a> | <a href="https://aka.ms/aaddevv2" target="_blank">AAD Docs</a> | <a href="https://azuread.github.io/microsoft-authentication-library-for-js/ref/modules/_azure_msal_react.html" target="_blank">Library Reference</a> | <a href="https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/samples" target="blank">Samples</a>
7
+ |--- | --- | --- | --- |
8
+
9
+ 1. [About](#about)
10
+ - [Goals](#goals)
11
+ - [Non-Goals](#non-goals)
12
+ 1. [FAQ](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/extensions/docs/faq.md)
13
+ 1. [Changelog](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/extensions/msal-node-extensions/CHANGELOG.md)
14
+ 1. [Prerequisites](#prerequisites)
15
+ 1. [Installation](#installation)
16
+ 1. [Usage](#usage)
17
+ - [Getting Started](#getting-started)
18
+ - [Security Boundary](#security-boundary)
19
+ 1. [Build and Test](#build-and-test)
20
+ - [Build package](#building-the-package-locally)
21
+ - [Test package](#running-tests)
22
+ 1. [Samples](#samples)
23
+ 1. [Security Reporting](#security-reporting)
24
+ 1. [License](#license)
25
+ 1. [Contributing](#contributing)
26
+ 1. [Code of Conduct](#we-value-and-adhere-to-the-microsoft-open-source-code-of-conduct)
27
+
28
+ ## About
29
+ The Microsoft Authentication Extensions for Node offers secure mechanisms for client applications to perform cross-platform token cache serialization and persistence. It gives additional support to the Microsoft Authentication Library for Node (MSAL).
30
+
31
+ [MSAL Node](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-node) supports an in-memory cache by default and provides the ICachePlugin interface to perform cache serialization, but does not provide a default way of storing the token cache to disk. Microsoft authentication extensions for node is default implementation for persisting cache to disk across different platforms.
32
+
33
+ Supported platforms are Windows, Mac and Linux:
34
+
35
+ - Windows - DPAPI is used for encryption.
36
+ - MAC - The MAC KeyChain is used.
37
+ - Linux - LibSecret is used for storing to "Secret Service".
38
+
39
+ > Note: It is recommended to use this library for cache persistence support for Public client applications such as Desktop apps only. In web applications, this may lead to scale and performance issues. Web applications are recommended to persist the cache in session.
40
+
41
+ ### Goals
42
+ * Provide a robust, secure and configurable token cache persistence implementation across Windows, Mac and Linux for public client applications (rich clients, CLI applications etc.)
43
+ * Token cache storage can be accessed by multiple processes concurrently.
44
+
45
+ ### Non Goals
46
+ * This implementation is not suitable for web app / web api scenarios, where storing the cache should be done in memory, Redis, Sql Server etc. Have a look at the [web samples](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/samples/msal-node-samples) for server-side implementations.
47
+
48
+ ## Prerequisites
49
+
50
+ The extensions contain prebuild binaries.
51
+ [node-gyp](https://github.com/nodejs/node-gyp) is used to compile addons for accessing system APIs. Installation requirements are listed on the [node-gyp README](https://github.com/nodejs/node-gyp#installation)
52
+
53
+ On linux, the library uses `libsecret` so you may need to install it. Depending on your distribution, you will need to run the following command:
54
+
55
+ - Debian/Ubuntu: `sudo apt-get install libsecret-1-dev`
56
+ - Red Hat-based: `sudo yum install libsecret-devel`
57
+ - Arch Linux: sudo `pacman -S libsecret`
58
+
59
+ ## Installation
60
+
61
+ The `msal-node-extensions` package is available on NPM.
62
+
63
+ ```bash
64
+ npm i @azure/msal-node-extensions --save
65
+ ```
66
+ ## Usage
67
+ ### Getting started
68
+ Here is a code snippet on how to configure the token cache.
69
+
70
+ ```js
71
+ const {
72
+ DataProtectionScope,
73
+ Environment,
74
+ PersistenceCreator,
75
+ PersistenceCachePlugin,
76
+ } = require("@azure/msal-node-extensions");
77
+
78
+ // You can use the helper functions provided through the Environment class to construct your cache path
79
+ // The helper functions provide consistent implementations across Windows, Mac and Linux.
80
+ const cachePath = path.join(Environment.getUserRootDirectory(), "./cache.json");
81
+
82
+ const persistenceConfiguration = {
83
+ cachePath,
84
+ dataProtectionScope: DataProtectionScope.CurrentUser,
85
+ serviceName: "<SERVICE-NAME>",
86
+ accountName: "<ACCOUNT-NAME>",
87
+ usePlaintextFileOnLinux: false,
88
+ }
89
+
90
+ // The PersistenceCreator obfuscates a lot of the complexity by doing the following actions for you :-
91
+ // 1. Detects the environment the application is running on and initializes the right persistence instance for the environment.
92
+ // 2. Performs persistence validation for you.
93
+ // 3. Performs any fallbacks if necessary.
94
+ PersistenceCreator
95
+ .createPersistence(persistenceConfiguration)
96
+ .then(async (persistence) => {
97
+ const publicClientConfig = {
98
+ auth: {
99
+ clientId: "<CLIENT-ID>",
100
+ authority: "<AUTHORITY>",
101
+ },
102
+
103
+ // This hooks up the cross-platform cache into MSAL
104
+ cache: {
105
+ cachePlugin: new PersistenceCachePlugin(persistence)
106
+ }
107
+ };
108
+
109
+ const pca = new msal.PublicClientApplication(publicClientConfig);
110
+
111
+ // Use the public client application as required...
112
+ });
113
+ ```
114
+
115
+ All the arguments for the persistence configuration are explained below:
116
+ | Field Name | Description | Required For |
117
+ | ---------- | ----------- | ------------ |
118
+ | cachePath | This is the path to the lock file the library uses to synchronize the reads and the writes | Windows, Mac and Linux |
119
+ | dataProtectionScope | Specifies the scope of the data protection on Windows either the current user or the local machine. | Windows |
120
+ | serviceName | This specifies the service name to be used on Mac and/or Linux | Mac and Linux |
121
+ | accountName | This specifies the account name to be used on Mac and/or Linux | Mac and Linux |
122
+ | usePlaintextFileOnLinux | This is a flag to default to plain text on linux if libsecret fails. Defaults to `false` | Linux |
123
+
124
+ ### Security boundary
125
+ On Windows and Linux, the token cache is scoped to the user session, i.e. all applications running on behalf of the user can access the cache. Mac offers a more restricted scope, ensuring that only the application that created the cache can access it, and prompting the user if others apps want access.
126
+
127
+ ## Build and Test
128
+
129
+ If you intend to contribute to the library visit the [`contributing section`](#contributing) for even more information on how.
130
+
131
+ ### Building the package locally
132
+
133
+ To build the `@azure/msal-node-extensions` library, you can do the following:
134
+
135
+ ```bash
136
+ // Install dev dependencies from root of repo
137
+ npm install
138
+ // Change to the msal-node-extensions package directory
139
+ cd extensions/msal-node-extensions
140
+ // To run build only for node-extensions package
141
+ npm run build
142
+ ```
143
+
144
+ To build both the `@azure/msal-node-extensions` library and `@azure/msal-common` libraries, you can do the following:
145
+
146
+ ```bash
147
+ // Install dev dependencies from root of repo
148
+ npm install
149
+ // Change to the msal-react package directory
150
+ cd lib/msal-node-extensions/
151
+ // To run build for the common package
152
+ npm run build:common
153
+ // To run build for the msal-node-extensions package
154
+ npm run build
155
+ ```
156
+
157
+ ### Running Tests
158
+
159
+ `@azure/msal-node-extensions` uses [jest](https://jestjs.io/) to run unit tests and coverage.
160
+
161
+ ```bash
162
+ // To run tests
163
+ npm test
164
+ ```
165
+
166
+ ## Samples
167
+ Have a look at a [simple auth-code app](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/extensions/samples/msal-node-extensions) using this token cache. We use this for testing on Windows, Mac and Linux.
168
+
169
+ ## Security Reporting
170
+
171
+ If you find a security issue with our libraries or services please report it to [secure@microsoft.com](mailto:secure@microsoft.com) with as much detail as possible. Your submission may be eligible for a bounty through the [Microsoft Bounty](http://aka.ms/bugbounty) program. Please do not post security issues to GitHub Issues or any other public site. We will contact you shortly upon receiving the information. We encourage you to get notifications of when security incidents occur by visiting [this page](https://technet.microsoft.com/security/dd252948) and subscribing to Security Advisory Alerts.
172
+
173
+ ## License
174
+
175
+ Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License.
176
+
177
+ ## Contributing
178
+
179
+ This project welcomes contributions and suggestions. Most contributions require you to agree to a
180
+ Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us
181
+ the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.
182
+
183
+ When you submit a pull request, a CLA bot will automatically determine whether you need to provide
184
+ a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions
185
+ provided by the bot. You will only need to do this once across all repos using our CLA.
186
+
187
+ This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
188
+ For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
189
+ contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
190
+
191
+ ## We Value and Adhere to the Microsoft Open Source Code of Conduct
192
+
192
193
  This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
package/binding.gyp CHANGED
@@ -1,29 +1,29 @@
1
- {
2
- "targets": [
3
- {
4
- 'target_name': 'dpapi',
5
- 'version': '0.1.0',
6
- 'sources': [
7
- 'src/dpapi-addon/main.cpp',
8
- 'src/dpapi-addon/dpapi_addon.h'
9
- ],
10
- 'include_dirs': [
11
- "<!(node -e \"require('nan')\")",
12
- "include"
13
- ],
14
- 'conditions': [
15
- ['OS=="win"', {
16
- 'sources': [
17
- 'src/dpapi-addon/dpapi_win.cpp',
18
- ],
19
- 'libraries': [
20
- '-lcrypt32.lib'
21
- ],
22
- }],
23
- ['OS not in ["win"]', {
24
- 'sources': [ 'src/dpapi-addon/dpapi_not_supported.ccp' ]
25
- }]
26
- ]
27
- }
28
- ]
29
- }
1
+ {
2
+ "targets": [
3
+ {
4
+ 'target_name': 'dpapi',
5
+ 'version': '0.1.0',
6
+ 'sources': [
7
+ 'src/dpapi-addon/main.cpp',
8
+ 'src/dpapi-addon/dpapi_addon.h'
9
+ ],
10
+ 'include_dirs': [
11
+ "<!(node -e \"require('nan')\")",
12
+ "include"
13
+ ],
14
+ 'conditions': [
15
+ ['OS=="win"', {
16
+ 'sources': [
17
+ 'src/dpapi-addon/dpapi_win.cpp',
18
+ ],
19
+ 'libraries': [
20
+ '-lcrypt32.lib'
21
+ ],
22
+ }],
23
+ ['OS not in ["win"]', {
24
+ 'sources': [ 'src/dpapi-addon/dpapi_not_supported.ccp' ]
25
+ }]
26
+ ]
27
+ }
28
+ ]
29
+ }
@@ -516,7 +516,10 @@ class FilePersistence extends BasePersistence {
516
516
  */
517
517
 
518
518
  /* eslint-disable-next-line @typescript-eslint/no-var-requires, no-var */
519
- var Dpapi = /*#__PURE__*/require("bindings")("dpapi");
519
+ var Dpapi = /*#__PURE__*/require("bindings")({
520
+ bindings: "dpapi",
521
+ userDefinedTries: [['module_root', 'node_modules', '@azure', 'msal-node-extensions', 'build', 'Release', 'bindings']]
522
+ });
520
523
 
521
524
  /*
522
525
  * Copyright (c) Microsoft Corporation. All rights reserved.