AzureAD / microsoft-authentication-library-for-js

Microsoft Authentication Library (MSAL) for JS
http://aka.ms/aadv2
MIT License
3.66k stars 2.65k forks source link

Opens many new tabs for authentication on iOS - Edge/Safari #7298

Open bensonjm opened 1 month ago

bensonjm commented 1 month ago

Core Library

MSAL.js (@azure/msal-browser)

Core Library Version

3.23.0

Wrapper Library

MSAL React (@azure/msal-react)

Wrapper Library Version

2.0.22

Public or Confidential Client?

Public

Description

I've configured msal-react for a react app but when I try to use it from my iPhone, whether it Edge or Safari, it keeps opens up multiple tabs.

I've created a sample repo.

Error Message

No response

MSAL Logs

No response

Network Trace (Preferrably Fiddler)

MSAL Configuration

auth: {
    clientId: <clientId>,
    authority: https://login.microsoftonline.com/<tenantId>,
    redirectUri: "/",
    postLogoutRedirectUri: "/",
  },
  cache: {
    cacheLocation: "localStorage",
    storeAuthStateInCookie: isIE || isEdge || isFirefox,
  },

Relevant Code Snippets

I've added the repo

Reproduction Steps

https://github.com/bensonjm/msal-react-test

Expected Behavior

It shouldn't be opening multiple tabs

Identity Provider

Entra ID (formerly Azure AD) / MSA

Browsers Affected (Select all that apply)

Edge, Safari

Regression

No response

Source

External (Customer)

sameerag commented 1 month ago

@bensonjm This could be a property of your browser. Have you checked if the browser is set to open a new tab when you try to open a popup? Also can you confirm your sample is using acquireTokenPopup?

bensonjm commented 1 month ago

@sameerag , it's using InteractionType.Redirect