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

@microsoft/mgt-msal2-provider

Package Overview
Dependencies
Maintainers
1
Versions
743
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

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

Comparing version 2.2.0-next.msal2provider.617820d to 2.2.0-next.msal2provider.94faf9f

14

dist/es6/mgt-msal2-provider.d.ts

@@ -29,13 +29,13 @@ /**

/**
* The authority to use.
* Comma separated list of scopes
*
* @memberof MgtMsalProvider
*/
authority: any;
scopes: any;
/**
* Comma separated list of scopes
* The authority to use.
*
* @memberof MgtMsalProvider
*/
scopes: any;
authority: any;
/**

@@ -48,8 +48,2 @@ * The redirect uri to use

/**
* Disables multiple account capability
*
* @memberof MgtMsal2Provider
*/
isMultiAccountDisabled: any;
/**
* Type of prompt for login

@@ -56,0 +50,0 @@ *

@@ -74,4 +74,6 @@ /**

}
if (this.isMultiAccountDisabled) {
config.isMultiAccountDisabled = true;
if (this.prompt) {
let prompt = this.prompt.toUpperCase();
const promptEnum = PromptType[prompt];
config.prompt = promptEnum;
}

@@ -103,6 +105,2 @@ if (this.prompt) {

__decorate([
property(),
__metadata("design:type", Object)
], MgtMsal2Provider.prototype, "authority", void 0);
__decorate([
property({

@@ -116,14 +114,14 @@ attribute: 'scopes',

property({
attribute: 'redirect-uri',
attribute: 'authority',
type: String
}),
__metadata("design:type", Object)
], MgtMsal2Provider.prototype, "redirectUri", void 0);
], MgtMsal2Provider.prototype, "authority", void 0);
__decorate([
property({
attribute: 'multi-account-disabled',
type: Boolean
attribute: 'redirect-uri',
type: String
}),
__metadata("design:type", Object)
], MgtMsal2Provider.prototype, "isMultiAccountDisabled", void 0);
], MgtMsal2Provider.prototype, "redirectUri", void 0);
__decorate([

@@ -130,0 +128,0 @@ property({

@@ -75,9 +75,2 @@ import { IProvider, LoginType, IProviderAccount } from '@microsoft/mgt-element';

/**
* Disable multi account functionality
*
* @type {boolean}
* @memberof Msal2Config
*/
isMultiAccountDisabled?: boolean;
/**
* Other options

@@ -164,2 +157,9 @@ *

/**
* Name used for analytics
*
* @readonly
* @memberof IProvider
*/
get name(): string;
/**
* List of scopes

@@ -166,0 +166,0 @@ *

@@ -50,2 +50,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

/**
* Name used for analytics
*
* @readonly
* @memberof IProvider
*/
get name() {
return 'MgtMsal2Provider';
}
/**
* Initialize provider with configuration details

@@ -86,4 +95,2 @@ *

this._publicClientApplication = new PublicClientApplication(this.ms_config);
this.isMultipleAccountDisabled =
typeof config.isMultiAccountDisabled !== 'undefined' ? config.isMultiAccountDisabled : false;
this._prompt = typeof config.prompt !== 'undefined' ? config.prompt : PromptType.SELECT_ACCOUNT;

@@ -352,8 +359,3 @@ this.graph = createFromProvider(this);

yield this._publicClientApplication.logoutPopup(Object.assign({}, logOutRequest));
if (this._publicClientApplication.getAllAccounts.length == 1 || this.isMultiAccountDisabled) {
this.setState(ProviderState.SignedOut);
}
else {
this.trySilentSignIn();
}
this.setState(ProviderState.SignedOut);
}

@@ -360,0 +362,0 @@ });

{
"name": "@microsoft/mgt-msal2-provider",
"version": "2.2.0-next.msal2provider.617820d",
"version": "2.2.0-next.msal2provider.94faf9f",
"description": "The Microsoft Graph Toolkit Msal 2.0 Provider",

@@ -42,3 +42,3 @@ "keywords": [

"dependencies": {
"@microsoft/mgt-element": "2.2.0-next.msal2provider.617820d",
"@microsoft/mgt-element": "2.2.0-next.msal2provider.94faf9f",
"@microsoft/microsoft-graph-client": "^2.2.1",

@@ -45,0 +45,0 @@ "@azure/msal-browser": "^2.13.0"

@@ -27,3 +27,2 @@ # Microsoft Graph Toolkit MSAL 2.0 Provider

clientId: 'clientId',
isMultiAccountDisabled?: Boolean, //Set this to true to disable multi account functionality
scopes?: string[],

@@ -50,7 +49,5 @@ authority?: string,

redirect-uri="https://my.redirect/uri"
multi-account-disabled
authority="">
</mgt-msal2-provider>
```
The ```multi-account-disabled``` attribute if present disables multi account functionality.

@@ -57,0 +54,0 @@ See [provider usage documentation](https://docs.microsoft.com/graph/toolkit/providers) to learn about how to use the providers with the mgt components, to sign in/sign out, get access tokens, call Microsoft Graph, and more.

@@ -43,9 +43,2 @@ /**

/**
* The authority to use.
*
* @memberof MgtMsalProvider
*/
@property() public authority;
/**
* Comma separated list of scopes

@@ -62,3 +55,3 @@ *

/**
* The redirect uri to use
* The authority to use.
*

@@ -68,17 +61,17 @@ * @memberof MgtMsalProvider

@property({
attribute: 'redirect-uri',
attribute: 'authority',
type: String
})
public redirectUri;
public authority;
/**
* Disables multiple account capability
* The redirect uri to use
*
* @memberof MgtMsal2Provider
* @memberof MgtMsalProvider
*/
@property({
attribute: 'multi-account-disabled',
type: Boolean
attribute: 'redirect-uri',
type: String
})
public isMultiAccountDisabled;
public redirectUri;

@@ -140,4 +133,6 @@ /**

if (this.isMultiAccountDisabled) {
config.isMultiAccountDisabled = true;
if (this.prompt) {
let prompt: string = this.prompt.toUpperCase();
const promptEnum = PromptType[prompt];
config.prompt = promptEnum;
}

@@ -144,0 +139,0 @@

@@ -102,10 +102,2 @@ import {

/**
* Disable multi account functionality
*
* @type {boolean}
* @memberof Msal2Config
*/
isMultiAccountDisabled?: boolean;
/**
* Other options

@@ -204,2 +196,12 @@ *

/**
* Name used for analytics
*
* @readonly
* @memberof IProvider
*/
public get name() {
return 'MgtMsal2Provider';
}
/**
* List of scopes

@@ -260,4 +262,2 @@ *

this._publicClientApplication = new PublicClientApplication(this.ms_config);
this.isMultipleAccountDisabled =
typeof config.isMultiAccountDisabled !== 'undefined' ? config.isMultiAccountDisabled : false;
this._prompt = typeof config.prompt !== 'undefined' ? config.prompt : PromptType.SELECT_ACCOUNT;

@@ -346,3 +346,3 @@ this.graph = createFromProvider(this);

this._publicClientApplication.getAllAccounts().forEach((account: AccountInfo) => {
usernames.push({ username: account.username, id: account.homeAccountId });
usernames.push({ username: account.username, id: account.homeAccountId } as IProviderAccount);
});

@@ -533,7 +533,3 @@ return usernames;

await this._publicClientApplication.logoutPopup({ ...logOutRequest });
if (this._publicClientApplication.getAllAccounts.length == 1 || this.isMultiAccountDisabled) {
this.setState(ProviderState.SignedOut);
} else {
this.trySilentSignIn();
}
this.setState(ProviderState.SignedOut);
}

@@ -540,0 +536,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

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