@microsoft/mgt-msal2-provider
Advanced tools
Comparing version 2.2.0 to 2.2.1-next.fluentui.896ffcf
@@ -25,21 +25,21 @@ /** | ||
* | ||
* @memberof MgtMsalProvider | ||
* @memberof MgtMsal2Provider | ||
*/ | ||
loginType: any; | ||
/** | ||
* Comma separated list of scopes | ||
* The authority to use. | ||
* | ||
* @memberof MgtMsalProvider | ||
* @memberof MgtMsal2Provider | ||
*/ | ||
scopes: any; | ||
authority: any; | ||
/** | ||
* The authority to use. | ||
* Comma separated list of scopes | ||
* | ||
* @memberof MgtMsalProvider | ||
* @memberof MgtMsal2Provider | ||
*/ | ||
authority: any; | ||
scopes: any; | ||
/** | ||
* The redirect uri to use | ||
* | ||
* @memberof MgtMsalProvider | ||
* @memberof MgtMsal2Provider | ||
*/ | ||
@@ -57,3 +57,3 @@ redirectUri: any; | ||
* @readonly | ||
* @memberof MgtMsalProvider | ||
* @memberof MgtMsal2Provider | ||
*/ | ||
@@ -65,3 +65,3 @@ get isAvailable(): boolean; | ||
* @protected | ||
* @memberof MgtMsalProvider | ||
* @memberof MgtMsal2Provider | ||
*/ | ||
@@ -68,0 +68,0 @@ protected initializeProvider(): void; |
@@ -40,3 +40,3 @@ /** | ||
* @readonly | ||
* @memberof MgtMsalProvider | ||
* @memberof MgtMsal2Provider | ||
*/ | ||
@@ -50,3 +50,3 @@ get isAvailable() { | ||
* @protected | ||
* @memberof MgtMsalProvider | ||
* @memberof MgtMsal2Provider | ||
*/ | ||
@@ -81,7 +81,2 @@ initializeProvider() { | ||
} | ||
if (this.prompt) { | ||
let prompt = this.prompt.toUpperCase(); | ||
const promptEnum = PromptType[prompt]; | ||
config.prompt = promptEnum; | ||
} | ||
this.provider = new Msal2Provider(config); | ||
@@ -107,2 +102,6 @@ Providers.globalProvider = this.provider; | ||
__decorate([ | ||
property(), | ||
__metadata("design:type", Object) | ||
], MgtMsal2Provider.prototype, "authority", void 0); | ||
__decorate([ | ||
property({ | ||
@@ -116,9 +115,2 @@ attribute: 'scopes', | ||
property({ | ||
attribute: 'authority', | ||
type: String | ||
}), | ||
__metadata("design:type", Object) | ||
], MgtMsal2Provider.prototype, "authority", void 0); | ||
__decorate([ | ||
property({ | ||
attribute: 'redirect-uri', | ||
@@ -125,0 +117,0 @@ type: String |
@@ -5,10 +5,10 @@ import { IProvider, LoginType, IProviderAccount } from '@microsoft/mgt-element'; | ||
/** | ||
* Config for MSAL2.0 Authentication | ||
* base config for MSAL 2.0 authentication | ||
* | ||
* @export | ||
* @interface Msal2Config | ||
* @interface Msal2ConfigBase | ||
*/ | ||
export interface Msal2Config { | ||
interface Msal2ConfigBase { | ||
/** | ||
* Client ID of app registration | ||
* Redirect URI | ||
* | ||
@@ -18,47 +18,54 @@ * @type {string} | ||
*/ | ||
clientId: string; | ||
redirectUri?: string; | ||
/** | ||
* LoginType | ||
* Authority URL | ||
* | ||
* @type {LoginType} | ||
* @type {string} | ||
* @memberof Msal2Config | ||
*/ | ||
loginType?: LoginType; | ||
authority?: string; | ||
/** | ||
* Other options | ||
* | ||
* @type {Configuration} | ||
* @memberof Msal2Config | ||
*/ | ||
options?: Configuration; | ||
/** | ||
* List of scopes required | ||
* | ||
* @type {string[]} | ||
* @memberof Msal2Config | ||
* @memberof Msal2ConfigBase | ||
*/ | ||
scopes?: string[]; | ||
/** | ||
* LoginHint | ||
* loginType if login uses popup | ||
* | ||
* @type {string} | ||
* @memberof Msal2Config | ||
* @type {LoginType} | ||
* @memberof Msal2ConfigBase | ||
*/ | ||
loginHint?: string; | ||
loginType?: LoginType; | ||
/** | ||
* Session ID | ||
* login hint value | ||
* | ||
* @type {string} | ||
* @memberof Msal2Config | ||
* @memberof Msal2ConfigBase | ||
*/ | ||
sid?: string; | ||
loginHint?: string; | ||
/** | ||
* Domain hint | ||
* Domain hint value | ||
* | ||
* @type {string} | ||
* @memberof Msal2Config | ||
* @memberof Msal2ConfigBase | ||
*/ | ||
domainHint?: string; | ||
/** | ||
* Prompt type | ||
* prompt value | ||
* | ||
* @type {Prompt} | ||
* @memberof Msal2Config | ||
* @type {string} | ||
* @memberof Msal2ConfigBase | ||
*/ | ||
prompt?: PromptType; | ||
/** | ||
* Redirect URI | ||
* Session ID | ||
* | ||
@@ -68,5 +75,13 @@ * @type {string} | ||
*/ | ||
redirectUri?: string; | ||
sid?: string; | ||
} | ||
/** | ||
* Config for MSAL2.0 Authentication | ||
* | ||
* @export | ||
* @interface Msal2Config | ||
*/ | ||
export interface Msal2Config extends Msal2ConfigBase { | ||
/** | ||
* Authority URL | ||
* Client ID of app registration | ||
* | ||
@@ -76,10 +91,18 @@ * @type {string} | ||
*/ | ||
authority?: string; | ||
clientId: string; | ||
} | ||
/** | ||
* Config for MSAL 2.0 Authentication where a PublicClientApplication already exists | ||
* | ||
* @export | ||
* @interface Msal2PublicClientApplicationConfig | ||
*/ | ||
export interface Msal2PublicClientApplicationConfig extends Msal2ConfigBase { | ||
/** | ||
* Other options | ||
* Existing PublicClientApplication instance to use | ||
* | ||
* @type {Configuration} | ||
* @memberof Msal2Config | ||
* @type {PublicClientApplication} | ||
* @memberof Msal2PublicClientApplicationConfig | ||
*/ | ||
options?: Configuration; | ||
publicClientApplication: PublicClientApplication; | ||
} | ||
@@ -176,3 +199,3 @@ /** | ||
private homeAccountKey; | ||
constructor(config: Msal2Config); | ||
constructor(config: Msal2Config | Msal2PublicClientApplicationConfig); | ||
/** | ||
@@ -289,3 +312,3 @@ * Initialize provider with configuration details | ||
*/ | ||
private getAccount; | ||
protected getAccount(): AccountInfo | null; | ||
/** | ||
@@ -306,2 +329,3 @@ * Logs out user | ||
} | ||
export {}; | ||
//# sourceMappingURL=Msal2Provider.d.ts.map |
@@ -67,46 +67,56 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
if (config.clientId) { | ||
const msalConfig = config.options || { auth: { clientId: config.clientId } }; | ||
this.ms_config = msalConfig; | ||
this.ms_config.auth.clientId = config.clientId; | ||
if (config.authority) { | ||
this.ms_config.auth.authority = config.authority; | ||
const msalConfig = config.options || { auth: { clientId: '' } }; | ||
this.ms_config = msalConfig; | ||
this.ms_config.cache = msalConfig.cache || {}; | ||
this.ms_config.cache.cacheLocation = msalConfig.cache.cacheLocation || 'localStorage'; | ||
if (typeof this.ms_config.cache.storeAuthStateInCookie === 'undefined' || | ||
this.ms_config.cache.storeAuthStateInCookie === null) { | ||
this.ms_config.cache.storeAuthStateInCookie = true; | ||
} | ||
this.ms_config.system = msalConfig.system || {}; | ||
this.ms_config.system.iframeHashTimeout = msalConfig.system.iframeHashTimeout || 10000; | ||
if (config.authority) { | ||
this.ms_config.auth.authority = config.authority; | ||
} | ||
if (config.redirectUri) { | ||
this.ms_config.auth.redirectUri = config.redirectUri; | ||
} | ||
if ('clientId' in config) { | ||
if (config.clientId) { | ||
this.ms_config.auth.clientId = config.clientId; | ||
this._publicClientApplication = new PublicClientApplication(this.ms_config); | ||
} | ||
if (config.redirectUri) { | ||
this.ms_config.auth.redirectUri = config.redirectUri; | ||
else { | ||
throw new Error('clientId must be provided'); | ||
} | ||
this.ms_config.cache = msalConfig.cache || {}; | ||
this.ms_config.cache.cacheLocation = msalConfig.cache.cacheLocation || 'localStorage'; | ||
if (typeof this.ms_config.cache.storeAuthStateInCookie === 'undefined' || | ||
this.ms_config.cache.storeAuthStateInCookie === null) { | ||
this.ms_config.cache.storeAuthStateInCookie = true; | ||
} | ||
else if ('publicClientApplication' in config) { | ||
if (config.publicClientApplication) { | ||
this._publicClientApplication = config.publicClientApplication; | ||
} | ||
if (config.redirectUri) { | ||
this.ms_config.auth.redirectUri = config.redirectUri; | ||
else { | ||
throw new Error('publicClientApplication must be provided'); | ||
} | ||
this.ms_config.system = msalConfig.system || {}; | ||
this.ms_config.system.iframeHashTimeout = msalConfig.system.iframeHashTimeout || 10000; | ||
this._loginType = typeof config.loginType !== 'undefined' ? config.loginType : LoginType.Redirect; | ||
this._loginHint = typeof config.loginHint !== 'undefined' ? config.loginHint : null; | ||
this._sid = typeof config.sid !== 'undefined' ? config.sid : null; | ||
this._domainHint = typeof config.domainHint !== 'undefined' ? config.domainHint : null; | ||
this.scopes = typeof config.scopes !== 'undefined' ? config.scopes : ['user.read']; | ||
this._publicClientApplication = new PublicClientApplication(this.ms_config); | ||
this._prompt = typeof config.prompt !== 'undefined' ? config.prompt : PromptType.SELECT_ACCOUNT; | ||
this.graph = createFromProvider(this); | ||
try { | ||
const tokenResponse = yield this._publicClientApplication.handleRedirectPromise(); | ||
if (tokenResponse !== null) { | ||
this.handleResponse(tokenResponse === null || tokenResponse === void 0 ? void 0 : tokenResponse.account); | ||
} | ||
else { | ||
this.trySilentSignIn(); | ||
} | ||
} | ||
else { | ||
throw new Error('either clientId or publicClientApplication must be provided'); | ||
} | ||
this._loginType = typeof config.loginType !== 'undefined' ? config.loginType : LoginType.Redirect; | ||
this._loginHint = typeof config.loginHint !== 'undefined' ? config.loginHint : null; | ||
this._sid = typeof config.sid !== 'undefined' ? config.sid : null; | ||
this._domainHint = typeof config.domainHint !== 'undefined' ? config.domainHint : null; | ||
this.scopes = typeof config.scopes !== 'undefined' ? config.scopes : ['user.read']; | ||
this._prompt = typeof config.prompt !== 'undefined' ? config.prompt : PromptType.SELECT_ACCOUNT; | ||
this.graph = createFromProvider(this); | ||
try { | ||
const tokenResponse = yield this._publicClientApplication.handleRedirectPromise(); | ||
if (tokenResponse !== null) { | ||
this.handleResponse(tokenResponse === null || tokenResponse === void 0 ? void 0 : tokenResponse.account); | ||
} | ||
catch (e) { | ||
throw e; | ||
else { | ||
this.trySilentSignIn(); | ||
} | ||
} | ||
else { | ||
throw new Error('clientId must be provided'); | ||
catch (e) { | ||
throw e; | ||
} | ||
@@ -113,0 +123,0 @@ }); |
{ | ||
"name": "@microsoft/mgt-msal2-provider", | ||
"version": "2.2.0", | ||
"version": "2.2.1-next.fluentui.896ffcf", | ||
"description": "The Microsoft Graph Toolkit Msal 2.0 Provider", | ||
@@ -42,5 +42,5 @@ "keywords": [ | ||
"dependencies": { | ||
"@microsoft/mgt-element": "2.2.0", | ||
"@microsoft/mgt-element": "2.2.1-next.fluentui.896ffcf", | ||
"@microsoft/microsoft-graph-client": "^2.2.1", | ||
"@azure/msal-browser": "^2.14.1" | ||
"@azure/msal-browser": "^2.14.2" | ||
}, | ||
@@ -47,0 +47,0 @@ "publishConfig": { |
@@ -18,3 +18,3 @@ # Microsoft Graph Toolkit MSAL 2.0 Provider | ||
2. Initialize the provider in code | ||
2. Initialize the provider in code with `Msal2Config` | ||
@@ -40,4 +40,26 @@ ```ts | ||
3. Alternatively, initialize the provider in html (only `client-id` is required): | ||
3. Initialize the provider in code with `Msal2PublicClientApplicationConfig` if a `PublicClientApplication` is already instantiated. For example, `msal-angular` instantiates `PublicClientApplication` on startup. | ||
```ts | ||
import {Providers, LoginType} from '@microsoft/mgt-element'; | ||
import {Msal2Provider, PromptType} from '@microsoft/mgt-msal2-provider'; | ||
import {PublicClientApplication} from '@azure/msal-browser'; | ||
// initialize the auth provider globally | ||
Providers.globalProvider = new Msal2Provider({ | ||
publicClientApplication: PublicClientApplication, | ||
scopes?: string[], | ||
authority?: string, | ||
redirectUri?: string, | ||
loginType?: LoginType, // LoginType.Popup or LoginType.Redirect (redirect is default) | ||
prompt?: PromptType, // PromptType.CONSENT, PromptType.LOGIN or PromptType.SELECT_ACCOUNT | ||
sid?: string, // Session ID | ||
loginHint?: string, | ||
domainHint?: string, | ||
options?: Configuration // msal js Configuration object | ||
}); | ||
``` | ||
4. Alternatively, initialize the provider in html (only `client-id` is required): | ||
```html | ||
@@ -44,0 +66,0 @@ <script type="module" src="../node_modules/@microsoft/mgt-msal2-provider/dist/es6/index.js" /> |
@@ -34,3 +34,3 @@ /** | ||
* | ||
* @memberof MgtMsalProvider | ||
* @memberof MgtMsal2Provider | ||
*/ | ||
@@ -44,22 +44,18 @@ @property({ | ||
/** | ||
* Comma separated list of scopes | ||
* The authority to use. | ||
* | ||
* @memberof MgtMsalProvider | ||
* @memberof MgtMsal2Provider | ||
*/ | ||
@property({ | ||
attribute: 'scopes', | ||
type: String | ||
}) | ||
public scopes; | ||
@property() public authority; | ||
/** | ||
* The authority to use. | ||
* Comma separated list of scopes | ||
* | ||
* @memberof MgtMsalProvider | ||
* @memberof MgtMsal2Provider | ||
*/ | ||
@property({ | ||
attribute: 'authority', | ||
attribute: 'scopes', | ||
type: String | ||
}) | ||
public authority; | ||
public scopes; | ||
@@ -69,3 +65,3 @@ /** | ||
* | ||
* @memberof MgtMsalProvider | ||
* @memberof MgtMsal2Provider | ||
*/ | ||
@@ -93,3 +89,3 @@ @property({ | ||
* @readonly | ||
* @memberof MgtMsalProvider | ||
* @memberof MgtMsal2Provider | ||
*/ | ||
@@ -104,3 +100,3 @@ public get isAvailable() { | ||
* @protected | ||
* @memberof MgtMsalProvider | ||
* @memberof MgtMsal2Provider | ||
*/ | ||
@@ -141,8 +137,2 @@ protected initializeProvider() { | ||
if (this.prompt) { | ||
let prompt: string = this.prompt.toUpperCase(); | ||
const promptEnum = PromptType[prompt]; | ||
config.prompt = promptEnum; | ||
} | ||
this.provider = new Msal2Provider(config); | ||
@@ -149,0 +139,0 @@ Providers.globalProvider = this.provider; |
@@ -23,10 +23,10 @@ import { | ||
/** | ||
* Config for MSAL2.0 Authentication | ||
* base config for MSAL 2.0 authentication | ||
* | ||
* @export | ||
* @interface Msal2Config | ||
* @interface Msal2ConfigBase | ||
*/ | ||
export interface Msal2Config { | ||
interface Msal2ConfigBase { | ||
/** | ||
* Client ID of app registration | ||
* Redirect URI | ||
* | ||
@@ -36,49 +36,53 @@ * @type {string} | ||
*/ | ||
clientId: string; | ||
redirectUri?: string; | ||
/** | ||
* LoginType | ||
* Authority URL | ||
* | ||
* @type {LoginType} | ||
* @type {string} | ||
* @memberof Msal2Config | ||
*/ | ||
loginType?: LoginType; | ||
authority?: string; | ||
/** | ||
* Other options | ||
* | ||
* @type {Configuration} | ||
* @memberof Msal2Config | ||
*/ | ||
options?: Configuration; | ||
/** | ||
* List of scopes required | ||
* | ||
* @type {string[]} | ||
* @memberof Msal2Config | ||
* @memberof Msal2ConfigBase | ||
*/ | ||
scopes?: string[]; | ||
/** | ||
* LoginHint | ||
* loginType if login uses popup | ||
* | ||
* @type {string} | ||
* @memberof Msal2Config | ||
* @type {LoginType} | ||
* @memberof Msal2ConfigBase | ||
*/ | ||
loginHint?: string; | ||
loginType?: LoginType; | ||
/** | ||
* Session ID | ||
* login hint value | ||
* | ||
* @type {string} | ||
* @memberof Msal2Config | ||
* @memberof Msal2ConfigBase | ||
*/ | ||
sid?: string; | ||
loginHint?: string; | ||
/** | ||
* Domain hint | ||
* Domain hint value | ||
* | ||
* @type {string} | ||
* @memberof Msal2Config | ||
* @memberof Msal2ConfigBase | ||
*/ | ||
domainHint?: string; | ||
/** | ||
* Prompt type | ||
* prompt value | ||
* | ||
* @type {Prompt} | ||
* @memberof Msal2Config | ||
* @type {string} | ||
* @memberof Msal2ConfigBase | ||
*/ | ||
@@ -88,3 +92,3 @@ prompt?: PromptType; | ||
/** | ||
* Redirect URI | ||
* Session ID | ||
* | ||
@@ -94,6 +98,14 @@ * @type {string} | ||
*/ | ||
redirectUri?: string; | ||
sid?: string; | ||
} | ||
/** | ||
* Config for MSAL2.0 Authentication | ||
* | ||
* @export | ||
* @interface Msal2Config | ||
*/ | ||
export interface Msal2Config extends Msal2ConfigBase { | ||
/** | ||
* Authority URL | ||
* Client ID of app registration | ||
* | ||
@@ -103,11 +115,19 @@ * @type {string} | ||
*/ | ||
authority?: string; | ||
clientId: string; | ||
} | ||
/** | ||
* Config for MSAL 2.0 Authentication where a PublicClientApplication already exists | ||
* | ||
* @export | ||
* @interface Msal2PublicClientApplicationConfig | ||
*/ | ||
export interface Msal2PublicClientApplicationConfig extends Msal2ConfigBase { | ||
/** | ||
* Other options | ||
* Existing PublicClientApplication instance to use | ||
* | ||
* @type {Configuration} | ||
* @memberof Msal2Config | ||
* @type {PublicClientApplication} | ||
* @memberof Msal2PublicClientApplicationConfig | ||
*/ | ||
options?: Configuration; | ||
publicClientApplication: PublicClientApplication; | ||
} | ||
@@ -221,3 +241,3 @@ | ||
public constructor(config: Msal2Config) { | ||
public constructor(config: Msal2Config | Msal2PublicClientApplicationConfig) { | ||
super(); | ||
@@ -234,49 +254,58 @@ this.initProvider(config); | ||
*/ | ||
private async initProvider(config: Msal2Config) { | ||
if (config.clientId) { | ||
const msalConfig: Configuration = config.options || { auth: { clientId: config.clientId } }; | ||
this.ms_config = msalConfig; | ||
this.ms_config.auth.clientId = config.clientId; | ||
if (config.authority) { | ||
this.ms_config.auth.authority = config.authority; | ||
} | ||
if (config.redirectUri) { | ||
this.ms_config.auth.redirectUri = config.redirectUri; | ||
} | ||
private async initProvider(config: Msal2Config | Msal2PublicClientApplicationConfig) { | ||
const msalConfig: Configuration = config.options || { auth: { clientId: '' } }; | ||
this.ms_config = msalConfig; | ||
this.ms_config.cache = msalConfig.cache || {}; | ||
this.ms_config.cache.cacheLocation = msalConfig.cache.cacheLocation || 'localStorage'; | ||
if ( | ||
typeof this.ms_config.cache.storeAuthStateInCookie === 'undefined' || | ||
this.ms_config.cache.storeAuthStateInCookie === null | ||
) { | ||
this.ms_config.cache.storeAuthStateInCookie = true; | ||
} | ||
this.ms_config.cache = msalConfig.cache || {}; | ||
this.ms_config.cache.cacheLocation = msalConfig.cache.cacheLocation || 'localStorage'; | ||
if ( | ||
typeof this.ms_config.cache.storeAuthStateInCookie === 'undefined' || | ||
this.ms_config.cache.storeAuthStateInCookie === null | ||
) { | ||
this.ms_config.cache.storeAuthStateInCookie = true; | ||
} | ||
this.ms_config.system = msalConfig.system || {}; | ||
this.ms_config.system.iframeHashTimeout = msalConfig.system.iframeHashTimeout || 10000; | ||
if (config.redirectUri) { | ||
this.ms_config.auth.redirectUri = config.redirectUri; | ||
if (config.authority) { | ||
this.ms_config.auth.authority = config.authority; | ||
} | ||
if (config.redirectUri) { | ||
this.ms_config.auth.redirectUri = config.redirectUri; | ||
} | ||
if ('clientId' in config) { | ||
if (config.clientId) { | ||
this.ms_config.auth.clientId = config.clientId; | ||
this._publicClientApplication = new PublicClientApplication(this.ms_config); | ||
} else { | ||
throw new Error('clientId must be provided'); | ||
} | ||
this.ms_config.system = msalConfig.system || {}; | ||
this.ms_config.system.iframeHashTimeout = msalConfig.system.iframeHashTimeout || 10000; | ||
this._loginType = typeof config.loginType !== 'undefined' ? config.loginType : LoginType.Redirect; | ||
this._loginHint = typeof config.loginHint !== 'undefined' ? config.loginHint : null; | ||
this._sid = typeof config.sid !== 'undefined' ? config.sid : null; | ||
this._domainHint = typeof config.domainHint !== 'undefined' ? config.domainHint : null; | ||
this.scopes = typeof config.scopes !== 'undefined' ? config.scopes : ['user.read']; | ||
this._publicClientApplication = new PublicClientApplication(this.ms_config); | ||
this._prompt = typeof config.prompt !== 'undefined' ? config.prompt : PromptType.SELECT_ACCOUNT; | ||
this.graph = createFromProvider(this); | ||
try { | ||
const tokenResponse = await this._publicClientApplication.handleRedirectPromise(); | ||
if (tokenResponse !== null) { | ||
this.handleResponse(tokenResponse?.account); | ||
} else { | ||
this.trySilentSignIn(); | ||
} | ||
} catch (e) { | ||
throw e; | ||
} else if ('publicClientApplication' in config) { | ||
if (config.publicClientApplication) { | ||
this._publicClientApplication = config.publicClientApplication; | ||
} else { | ||
throw new Error('publicClientApplication must be provided'); | ||
} | ||
} else { | ||
throw new Error('clientId must be provided'); | ||
throw new Error('either clientId or publicClientApplication must be provided'); | ||
} | ||
this._loginType = typeof config.loginType !== 'undefined' ? config.loginType : LoginType.Redirect; | ||
this._loginHint = typeof config.loginHint !== 'undefined' ? config.loginHint : null; | ||
this._sid = typeof config.sid !== 'undefined' ? config.sid : null; | ||
this._domainHint = typeof config.domainHint !== 'undefined' ? config.domainHint : null; | ||
this.scopes = typeof config.scopes !== 'undefined' ? config.scopes : ['user.read']; | ||
this._prompt = typeof config.prompt !== 'undefined' ? config.prompt : PromptType.SELECT_ACCOUNT; | ||
this.graph = createFromProvider(this); | ||
try { | ||
const tokenResponse = await this._publicClientApplication.handleRedirectPromise(); | ||
if (tokenResponse !== null) { | ||
this.handleResponse(tokenResponse?.account); | ||
} else { | ||
this.trySilentSignIn(); | ||
} | ||
} catch (e) { | ||
throw e; | ||
} | ||
} | ||
@@ -509,3 +538,3 @@ | ||
*/ | ||
private getAccount(): AccountInfo | null { | ||
protected getAccount(): AccountInfo | null { | ||
const account = this.getStoredAccount(); | ||
@@ -512,0 +541,0 @@ if (account) { |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
932574
1617
80
1
+ Added@microsoft/mgt-element@2.2.1-next.fluentui.896ffcf(transitive)
- Removed@microsoft/mgt-element@2.2.0(transitive)
Updated@azure/msal-browser@^2.14.2