Azure-Samples / ms-identity-javascript-v2

VanillaJS sample using MSAL.js v2.x and OAuth 2.0 Authorization Code Flow with PKCE on Microsoft identity platform
MIT License
105 stars 84 forks source link

Not working due to bug in msal-browser.js 2.3.1 #21

Closed fauberon closed 3 years ago

fauberon commented 3 years ago

Library

Framework

Description

See related issue to the msal library here: https://github.com/AzureAD/microsoft-authentication-library-for-js/issues/2476

Error Message

Security

Regression

Version: 2.3.0

MSAL Configuration

// Provide configuration values here.
// For Azure B2C issues, please include your policies.

Reproduction steps

Configure the app Run the app Try to log Page stays the same as the error occurs in console. Works with msal-browser 2.3.0

Expected behavior

After login, the /token request fails as described in the related issue

The console logs this error: msal.js:46 [AcquireTokenSilent] Unhandled Error:TypeError TypeError: Cannot read property 'length' of null at Function.ServerTelemetryManager.maxErrorsToSend (index.es.js:7220) at ServerTelemetryManager.generateLastRequestHeaderValue (index.es.js:7136) at RefreshTokenClient.BaseClient.createDefaultTokenRequestHeaders (index.es.js:4286) at RefreshTokenClient. (index.es.js:6357) at step (index.es.js:394) at Object.next (index.es.js:324) at fulfilled (index.es.js:276)

Browsers/Environment

derisen commented 3 years ago

@fauberon thanks a lot for catching this. Will do a PR asap to downgrade for the moment until the issue resolves.