Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@microsoft/mgt-electron-provider

Package Overview
Dependencies
Maintainers
2
Versions
800
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@microsoft/mgt-electron-provider - npm Package Compare versions

Comparing version 4.0.1 to 4.1.0-preview.1e695aa

2

dist/Authenticator/ElectronAuthenticator.d.ts

@@ -147,2 +147,4 @@ /**

private _approvedScopes;
protected get approvedScopes(): string[];
protected set approvedScopes(value: string[]);
/**

@@ -149,0 +151,0 @@ * Creates an instance of ElectronAuthenticator.

@@ -20,2 +20,3 @@ "use strict";

const msal_node_1 = require("@azure/msal-node");
const mgt_element_1 = require("@microsoft/mgt-element");
const electron_1 = require("electron");

@@ -60,2 +61,11 @@ const CustomFileProtocol_1 = require("./CustomFileProtocol");

class ElectronAuthenticator {
get approvedScopes() {
return this._approvedScopes;
}
set approvedScopes(value) {
if (!(0, mgt_element_1.arraysAreEqual)(value, this._approvedScopes)) {
this._approvedScopes = value;
this.mainWindow.webContents.send('approvedScopes', value);
}
}
/**

@@ -200,3 +210,3 @@ * Creates an instance of ElectronAuthenticator.

if (authResponse) {
this._approvedScopes = authResponse.scopes;
this.approvedScopes = authResponse.scopes;
return authResponse.accessToken;

@@ -268,3 +278,3 @@ }

if (response) {
this._approvedScopes = response.scopes;
this.approvedScopes = response.scopes;
this.account = (response === null || response === void 0 ? void 0 : response.account) || undefined;

@@ -271,0 +281,0 @@ }

@@ -19,2 +19,3 @@ /**

logout: () => Promise<void>;
approvedScopes: (callback: (event: IpcRendererEvent, approvedScopes: string[]) => void) => void;
}

@@ -21,0 +22,0 @@ /**

@@ -59,2 +59,5 @@ /**

});
this.contextBridge.approvedScopes((_event, approvedScopes) => {
Providers.globalProvider.approvedScopes = approvedScopes;
});
}

@@ -61,0 +64,0 @@ /**

18

package.json
{
"name": "@microsoft/mgt-electron-provider",
"version": "4.0.1",
"version": "4.1.0-preview.1e695aa",
"description": "The Microsoft Graph Toolkit Electron Provider",

@@ -45,13 +45,15 @@ "keywords": [

"dependencies": {
"@azure/msal-node": "^1.0.3",
"@microsoft/mgt-element": "4.0.1",
"@microsoft/microsoft-graph-client": "3.0.2",
"electron": "^11.0.2"
"@azure/msal-node": "^1.18.4",
"@microsoft/mgt-element": "4.1.0-preview.1e695aa",
"@microsoft/microsoft-graph-client": "3.0.2"
},
"peerDependencies": {
"electron": ">=11.0.2 <29.0.0"
},
"devDependencies": {
"electron": "^28.2.4"
},
"publishConfig": {
"directory": "dist"
},
"resolutions": {
"responselike": "2.0.0"
}
}

@@ -21,3 +21,3 @@ /**

import { AuthenticationProviderOptions } from '@microsoft/microsoft-graph-client';
import { GraphEndpoint } from '@microsoft/mgt-element';
import { arraysAreEqual, GraphEndpoint } from '@microsoft/mgt-element';
import { BrowserWindow, ipcMain } from 'electron';

@@ -201,2 +201,11 @@ import { CustomFileProtocolListener } from './CustomFileProtocol';

private _approvedScopes: string[];
protected get approvedScopes(): string[] {
return this._approvedScopes;
}
protected set approvedScopes(value: string[]) {
if (!arraysAreEqual(value, this._approvedScopes)) {
this._approvedScopes = value;
this.mainWindow.webContents.send('approvedScopes', value);
}
}

@@ -351,3 +360,3 @@ /**

if (authResponse) {
this._approvedScopes = authResponse.scopes;
this.approvedScopes = authResponse.scopes;
return authResponse.accessToken;

@@ -416,3 +425,3 @@ }

if (response) {
this._approvedScopes = response.scopes;
this.approvedScopes = response.scopes;
this.account = response?.account || undefined;

@@ -419,0 +428,0 @@ } else {

@@ -28,2 +28,3 @@ /**

logout: () => Promise<void>;
approvedScopes: (callback: (event: IpcRendererEvent, approvedScopes: string[]) => void) => void;
}

@@ -76,2 +77,5 @@

});
this.contextBridge.approvedScopes((_event, approvedScopes) => {
Providers.globalProvider.approvedScopes = approvedScopes;
});
}

@@ -78,0 +82,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc