Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "fix: add forked bindings library to node-extensions",
"packageName": "@azure/msal-angular",
"email": "kamausamuel11@gmail.com",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "fix: add forked bindings library to node-extensions",
"packageName": "@azure/msal-browser",
"email": "kamausamuel11@gmail.com",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "fix: integrate forked bindings package",
"packageName": "@azure/msal-common",
"email": "kamausamuel11@gmail.com",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "fix: add forked bindings library to node-extensions",
"packageName": "@azure/msal-node",
"email": "kamausamuel11@gmail.com",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "fix: integrate forked bindings package",
"packageName": "@azure/msal-node-extensions",
"email": "kamausamuel11@gmail.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "fix: add forked bindings library to node-extensins",
"packageName": "@azure/msal-react",
"email": "kamausamuel11@gmail.com",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "fix: integrate forked bindings package",
"packageName": "electron-msal-node-extensions",
"email": "kamausamuel11@gmail.com",
"dependentChangeType": "none"
}
7 changes: 7 additions & 0 deletions change/msal-625d5fc0-4dfb-4d90-8e8f-0e6cd31e5162.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "fix: add forked bindings library to node-extensions",
"packageName": "msal",
"email": "kamausamuel11@gmail.com",
"dependentChangeType": "none"
}
19 changes: 9 additions & 10 deletions extensions/msal-node-extensions/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion extensions/msal-node-extensions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"module": "dist/test.esm.js",
"dependencies": {
"@azure/msal-common": "^5.0.0",
"bindings": "^1.5.0",
"bindings": "git://github.com/samuelkubai/node-bindings.git#v1.6.0",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did we follow up on creating an azure repo for this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes we did, we realized it would take a lot longer to process and thus decided to go on with this setup for the time being as we research on how best to switch to a repo under AzureAD

"keytar": "^7.6.0",
"nan": "^2.13.2"
},
Expand Down
7 changes: 6 additions & 1 deletion extensions/msal-node-extensions/src/dpapi-addon/Dpapi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,10 @@ export interface DpapiBindings{
unprotectData(encryptData: Uint8Array, optionalEntropy: Uint8Array, scope: string): Uint8Array
}
/* eslint-disable-next-line @typescript-eslint/no-var-requires, no-var */
export var Dpapi: DpapiBindings = require("bindings")("dpapi");
export var Dpapi: DpapiBindings = require("bindings")({
bindings: "dpapi",
userDefinedTries: [
['module_root', 'node_modules', '@azure', 'msal-node-extensions', 'build', 'Release', 'bindings'],
]
});
export default Dpapi;
12 changes: 12 additions & 0 deletions extensions/samples/electron-webpack/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"plugins": [
"@typescript-eslint"
],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended"
]
}
2 changes: 2 additions & 0 deletions extensions/samples/electron-webpack/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
dist
21 changes: 21 additions & 0 deletions extensions/samples/electron-webpack/LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2020 Microsoft

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
45 changes: 45 additions & 0 deletions extensions/samples/electron-webpack/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
## About
This is a sample that depicts how to integrate the `msal-node-extensions` library to your [electron](https://www.electronjs.org/) application that has been bundled by [webpack](https://webpack.js.org/).

## Getting started
To get started using this sample, you need to do the following:

**1. Change the MSAL Electron Configuration** \
Navigate to the `main.ts` file in the src folder and replace the `<CLIENT_ID>` with your client ID. Follow this [steps](https://docs.microsoft.com/en-us/graph/toolkit/get-started/build-an-electron-app#add-new-application-registration-in-azure-ad-to-get-a-client-id) to generate the client ID from Azure.
Comment thread
derisen marked this conversation as resolved.

```js
// Initialize the electron authenticator
const config: MsalElectronConfig = {
clientId: '<CLIENT_ID>', // <<== Replace this placeholder with your client ID
mainWindow: mainWindow, //BrowserWindow instance that requires auth
scopes: [
'user.read',
'people.read',
'user.readbasic.all',
'contacts.read',
'presence.read.all',
'presence.read',
'user.read.all',
'calendars.read',
'Sites.Read.All',
'Sites.ReadWrite.All',
],
cachePlugin: new PersistenceCachePlugin(persistence),
};
```

**2. Run `npm install`** \
Run `npm install` or your preferred alternative to it, to install the dependencies necessary to run the sample.

```bash
npm install
```

**3. Start your application** \
To start your application, run the command below:

```bash
npm run start
```

> NOTE: If you encounter any errors related to having some of the binaries built with a different NODE_VERSION, run `npm run rebuild` to try rebuild the application with the right NODE_VERSION target
Empty file.
12 changes: 12 additions & 0 deletions extensions/samples/electron-webpack/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Sample Electron Msal Node Etensions</title>
</head>
<body>
<mgt-login></mgt-login>
<mgt-agenda group-by-day></mgt-agenda>
<script type="module" src="./dist/renderer.js"></script>
</body>
</html>
Loading