Open jssuttles opened 3 weeks ago
If MSAL runs in Node, it should run in NW.js. You'll have to rebuild the native modules using NW.js's Node headers.
node-gyp rebuild --target=22.2.0 --nodedir=path/to/nw/node/headers
Using 22.2.0 since nw version is 0.89.0
https://github.com/nodejs/node-gyp?tab=readme-ov-file#build-for-third-party-nodejs-runtimes node-gyp has supported third party runtimes for a while. NW.js v0.89.0 uses Node v22.2.0. node-gyp v10 should be compatible with it but I haven't personally tried it out.
Issue Type
Before opening an issue, please search and see if it has already been raised.
[X] Bug Report
[ ] Feature Request
[X] Successfully reproduced against the latest version of NW.js?
Current/Missing Behavior
I'm looking for something that will be able to encrypt and decrypt data for a machine. I see that electron has something like https://www.electronjs.org/docs/latest/api/safe-storage. I've tried incorporating keytar (which is archived) or @azure/msal-node-extensions (https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/extensions/msal-node-extensions). The latter was promising, but I couldn't get nwjs to run it. I was able to get it running in a node.js environment, but when I tried to get it to run using nwjs, it would stall out. When I tried to create a fork in nwjs into node.js, it also failed to load.
Expected/Proposed Behavior
There is a way to encrypt and decrypt data using something like DPAPI for windows.
Additional Info