Microsoft-authentication-library-for-js: Subsequent calls to acquireTokenPopup break the first invocation and prevent authentication

Created on 18 Nov 2020  路  3Comments  路  Source: AzureAD/microsoft-authentication-library-for-js

Library

Framework

AngularJS.

Description

The first call to acquireTokenPopup works correctly. If there is a subsequent call to acquireTokenPopup before the first one has completed, it causes the first popup to go blank, and raises a BrowserAuthError.interaction_in_progress error.

Error Message

MSAL Configuration

new PublicClientApplication({
  auth: {
      clientId: "client-id",
    },
    cache: {
      cacheLocation: "localStorage",
      storeAuthStateInCookie: false,
    }
})

Reproduction steps

application.acquireTokenPopup()

setTimeout(() => {
  application.acquireTokenPopup()
}, 500)

Expected behavior

Subsequent calls to acquireTokenPopup should raise the BrowserAuthError.interaction_in_progress without interrupting the first auth flow.

Browsers/Environment

  • [x] Chrome
  • [ ] Firefox
  • [ ] Edge
  • [ ] Safari
  • [ ] IE
  • [ ] Other (Please add browser name here)
bug msal-browser

Most helpful comment

PR to fix issues related to blank popup windows is linked above. This will allow separate tabs to open their own popups, and prevent the first popup from breaking when a second one is opened.

All 3 comments

This issue has not seen activity in 14 days. It will be closed in 7 days if it remains stale.

I observed the similar behavior; however, for me it was the second, most recent popup that goes blank. (still an issue in [email protected])

PR to fix issues related to blank popup windows is linked above. This will allow separate tabs to open their own popups, and prevent the first popup from breaking when a second one is opened.

Was this page helpful?
0 / 5 - 0 ratings