Socket
Socket
Sign inDemoInstall

@azure/msal-browser

Package Overview
Dependencies
Maintainers
3
Versions
117
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@azure/msal-browser - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

dist/src/utils/BrowserProtocolUtils.d.ts

16

changelog.md

@@ -0,1 +1,17 @@

# 2.0.1
## Breaking Changes
* None
## Features and Fixes
* Make request object optional for login APIs in PublicClientApplication (#2061)
* Fix `getAccountByUsername()` API signatures to return null (#2059)
* (#2078) Fix issues with `handleRedirectPromise()` where:
* state mismatches occur if `handleRedirectPromise()` is called multiple times.
* `currentUrl` and `loginRequestUrl` being evaluated as not equal if one has a trailing slash and the other does not
* When `loginRequestUrl` is not in the cache, msal redirects to the homepage but would not process the hash
* Add `sid` from `AuthorizationUrlRequest` to SSO check in `ssoSilent()` (#2030)
* Add interaction type to platform state and check before processing hash (#2045)
* Implements telemetry error calculation and caching for server telemetry information in browser scenarios (#1918)
* Fix promise handling in PublicClientApplication (#2091)
# 2.0.0

@@ -2,0 +18,0 @@ ## Breaking Changes

6

dist/src/app/IPublicClientApplication.d.ts

@@ -9,9 +9,9 @@ import { AuthenticationResult, AuthorizationUrlRequest, AccountInfo, EndSessionRequest } from "@azure/msal-common";

acquireTokenSilent(silentRequest: SilentRequest): Promise<AuthenticationResult>;
getAccountByUsername(userName: string): AccountInfo;
getAccountByUsername(userName: string): AccountInfo | null;
getAllAccounts(): AccountInfo[];
handleRedirectPromise(): Promise<AuthenticationResult | null>;
loginPopup(request: PopupRequest): Promise<AuthenticationResult>;
loginRedirect(request: RedirectRequest): Promise<void>;
loginPopup(request?: PopupRequest): Promise<AuthenticationResult>;
loginRedirect(request?: RedirectRequest): Promise<void>;
logout(logoutRequest?: EndSessionRequest): Promise<void>;
ssoSilent(request: AuthorizationUrlRequest): Promise<AuthenticationResult>;
}

@@ -55,2 +55,8 @@ import { AuthorizationUrlRequest, AuthenticationResult, AccountInfo, EndSessionRequest } from "@azure/msal-common";

/**
* Gets the response hash for a redirect request
* Returns null if interactionType in the state value is not "redirect" or the hash does not contain known properties
* @returns {string}
*/
private getRedirectResponseHash;
/**
* Checks if hash exists and handles in window.

@@ -70,3 +76,3 @@ * @param responseHash

*/
loginRedirect(request: RedirectRequest): Promise<void>;
loginRedirect(request?: RedirectRequest): Promise<void>;
/**

@@ -89,3 +95,3 @@ * Use when you want to obtain an access_token for your API by redirecting the user's browser window to the authorization endpoint. This function redirects

*/
loginPopup(request: PopupRequest): Promise<AuthenticationResult>;
loginPopup(request?: PopupRequest): Promise<AuthenticationResult>;
/**

@@ -99,7 +105,2 @@ * Use when you want to obtain an access_token for your API via opening a popup window in the user's browser

/**
* Helper which acquires an authorization code with a popup from given url, and exchanges the code for a set of OAuth tokens.
* @param navigateUrl
*/
private popupTokenHelper;
/**
* This function uses a hidden iframe to fetch an authorization code from the eSTS. There are cases where this may not work:

@@ -159,3 +160,3 @@ * - Any browser using a form of Intelligent Tracking Prevention

*/
getAccountByUsername(userName: string): AccountInfo;
getAccountByUsername(userName: string): AccountInfo | null;
/**

@@ -206,2 +207,3 @@ *

private initializeBaseRequest;
private initializeServerTelemetryManager;
/**

@@ -208,0 +210,0 @@ * Generates a request that will contain the openid and profile scopes.

import { AuthorizationUrlRequest } from "@azure/msal-common";
/**
* @type PopupRequest: Request object passed by user to retrieve a Code from the
* PopupRequest: Request object passed by user to retrieve a Code from the
* server (first leg of authorization code grant flow) with a popup window.

@@ -21,2 +21,3 @@ *

* - loginHint - Can be used to pre-fill the username/email address field of the sign-in page for the user, if you know the username/email address ahead of time. Often apps use this parameter during re-authentication, having already extracted the username from a previous sign-in using the preferred_username claim.
* - sid - Session ID, unique identifier for the session. Available as an optional claim on ID tokens.
* - domainHint - Provides a hint about the tenant or domain that the user should use to sign in. The value of the domain hint is a registered domain for the tenant.

@@ -23,0 +24,0 @@ * - extraQueryParameters - String to string map of custom query parameters.

import { AuthorizationUrlRequest } from "@azure/msal-common";
/**
* @type RedirectRequest: Request object passed by user to retrieve a Code from the
* RedirectRequest: Request object passed by user to retrieve a Code from the
* server (first leg of authorization code grant flow) with a full page redirect.

@@ -21,2 +21,3 @@ *

* - loginHint - Can be used to pre-fill the username/email address field of the sign-in page for the user, if you know the username/email address ahead of time. Often apps use this parameter during re-authentication, having already extracted the username from a previous sign-in using the preferred_username claim.
* - sid - Session ID, unique identifier for the session. Available as an optional claim on ID tokens.
* - domainHint - Provides a hint about the tenant or domain that the user should use to sign in. The value of the domain hint is a registered domain for the tenant.

@@ -23,0 +24,0 @@ * - extraQueryParameters - String to string map of custom query parameters.

import { SilentFlowRequest } from "@azure/msal-common";
/**
* @type SilentRequest: Request object passed by user to retrieve tokens from the
* SilentRequest: Request object passed by user to retrieve tokens from the
* cache, renew an expired token with a refresh token, or retrieve a code (first leg of authorization code grant flow)

@@ -5,0 +5,0 @@ * in a hidden iframe.

@@ -0,1 +1,2 @@

import { AuthorizationUrlRequest } from "@azure/msal-common";
/**

@@ -37,1 +38,21 @@ * Constants

}
/**
* API Codes for Telemetry purposes.
* Before adding a new code you must claim it in the MSAL Telemetry tracker as these number spaces are shared across all MSALs
* 0-99 Silent Flow
* 800-899 Auth Code Flow
*/
export declare enum ApiId {
acquireTokenRedirect = 861,
acquireTokenPopup = 862,
ssoSilent = 863,
acquireTokenSilent_authCode = 864,
handleRedirectPromise = 865,
acquireTokenSilent_silentFlow = 61
}
export declare enum InteractionType {
REDIRECT = "redirect",
POPUP = "popup",
SILENT = "silent"
}
export declare const DEFAULT_REQUEST: AuthorizationUrlRequest;

@@ -29,2 +29,6 @@ import { INetworkModule } from "@azure/msal-common";

/**
* Gets the homepage url for the current window location.
*/
static getHomepage(): string;
/**
* Returns best compatible network client object.

@@ -31,0 +35,0 @@ */

@@ -13,3 +13,3 @@ {

},
"version": "2.0.0",
"version": "2.0.1",
"description": "Microsoft Authentication Library for js",

@@ -77,2 +77,3 @@ "keywords": [

"babel-plugin-istanbul": "^5.2.0",
"beachball": "^1.32.2",
"chai": "^4.2.0",

@@ -102,4 +103,4 @@ "chai-as-promised": "^7.1.1",

"dependencies": {
"@azure/msal-common": "1.0.0"
"@azure/msal-common": "^1.1.0"
}
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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