AzureAD / microsoft-authentication-library-for-js

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

Login popup window does not appear in the center when using multiple screens #4092

Closed mrazgoner closed 3 years ago

mrazgoner commented 3 years ago

Core Library

MSAL.js v1 (@azure/msal or msal)

Core Library Version

2.17.0

Wrapper Library

MSAL Angular (@azure/msal-angular)

Wrapper Library Version

1.1.2

Description

when I open a login popup while using multiple screens, the popup appears in a place that doesn't make sense and is partially inaccessible.

Error Message

No response

Msal Logs

No response

MSAL Configuration

MsalModule.forRoot({
      auth: {
        clientId: '*******',
        authority: 'https://login.microsoftonline.com/*****/',
        validateAuthority: true,
        redirectUri: 'http://localhost:4200/',
        postLogoutRedirectUri: 'http://localhost:4200/',
        navigateToLoginRequestUrl: true,
      },
      cache: {
        cacheLocation: 'localStorage',
        storeAuthStateInCookie: isIE, // set to true for IE 11
      },
    },
      {
        popUp: !isIE,
        consentScopes: [
          'user.read',
          'openid',
          'profile',
          'api://**********/access_as_user'
        ],
        unprotectedResources: ['https://www.microsoft.com/en-us/'],
        protectedResourceMap,
        extraQueryParameters: {}
      }
    )
  ],
  declarations: [

  ],
  providers: [
    MsalLoginService,
    {
      provide: HTTP_INTERCEPTORS,
      useClass: MsalInterceptor,
      multi: true
    }
  ]
})

Relevant Code Snippets

this.authService.loginPopup({ scopes: ['user.read'], prompt: 'select_account' })
.then(res => {....

Reproduction Steps

  1. connect two additional screens to laptop
  2. open a popup

Expected Behavior

popup appears in the center of one of the screens.

Identity Provider

Azure AD / MSA

Browsers Affected (Select all that apply)

Chrome

Regression

No response

Source

Internal (Microsoft)

samuelkubai commented 3 years ago

Hi @mrazgoner, we have pushed some work on this issue on meal-angular v2, have you tried to reproduce this bug with the latest version of msal-angular?

mrazgoner commented 3 years ago

Hi @samuelkubai, Thank you for your response, we use msal-angular v1 since the project is on Angular6 and the version support table on https://www.npmjs.com/package/@azure/msal-angular says it's the appropriate version to use, however I have tried to run the popup on "Angular 11 - MSAL v2 Quickstart Sample" and could not reproduce the behavior.

samuelkubai commented 3 years ago

Hi @mrazgoner, please provide a screenshot/video of this behaviour?

ghost commented 3 years ago

@mrazgoner This issue has been automatically marked as stale because it is marked as requiring author feedback but has not had any activity for 5 days. If your issue has been resolved please let us know by closing the issue. If your issue has not been resolved please leave a comment to keep this open. It will be closed automatically in 7 days if it remains stale.