Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Login popup flow does not work for full-screen browsers #5123

Closed
danielvoigt opened this issue Aug 22, 2022 · 5 comments
Closed

Login popup flow does not work for full-screen browsers #5123

danielvoigt opened this issue Aug 22, 2022 · 5 comments
Assignees
Labels
bug A problem that needs to be fixed for the feature to function as intended. duplicate Duplicate issue. msal-browser Related to msal-browser package public-client Issues regarding PublicClientApplications

Comments

@danielvoigt
Copy link
Contributor

Core Library

MSAL.js v2 (@azure/msal-browser)

Core Library Version

2.28.1

Wrapper Library

MSAL Angular (@azure/msal-angular)

Wrapper Library Version

2.4.1

Public or Confidential Client?

Public

Description

The issue is fairly simple:

  • When the browser is in full-screen mode, the flow starts but then the page does not close itself or redirect back to the original page. The user is also unable to successfully login.
  • When the browser is not in full-screen mode, the flow starts, the user can sign-in and the popup closes and redirects back to the page with the user successfully signed in
  • Tested with multiple browsers. Using B2C flow. I tested an app that was not B2C and this flow was working.

Error Message

No response

Msal Logs

No response

MSAL Configuration

{
    auth: {
      clientId: 'uuid-goes-here',
      authority:
        'https://company-name.b2clogin.com/company-name.onmicrosoft.com/B2C_1_SignInOnly',
      redirectUri: 'http://localhost:4200',
      knownAuthorities: ['company-name.b2clogin.com'],
      postLogoutRedirectUri: 'http://localhost:4200',
      navigateToLoginRequestUrl: true,
    },
  }

Relevant Code Snippets

this.msalService
      .loginPopup()
      .subscribe((response: AuthenticationResult) => {
        this.msalService.instance.setActiveAccount(response.account);
        if (this.msalService.instance.getActiveAccount() !== null) {
           // redirect to main page on successful sign-in. this should be done automatically be the library but this step is needed otherwise the redirect does not happen
           this.router.navigate(['/']);
        }
      }

      });

Reproduction Steps

  1. create a b2c configuration
  2. use the login popup flow
  3. attempt to login successfully with a browser in full-screen mode

Expected Behavior

When in full-screen mode a browser is still able to use the login popup flow to successfully signin

Identity Provider

Azure B2C Custom Policy

Browsers Affected (Select all that apply)

Chrome, Safari, Other

Regression

No response

Source

External (Customer)

@danielvoigt danielvoigt added bug-unconfirmed A reported bug that needs to be investigated and confirmed question Customer is asking for a clarification, use case or information. labels Aug 22, 2022
@ghost ghost added the Needs: Attention 👋 Awaiting response from the MSAL.js team label Aug 22, 2022
@github-actions github-actions bot added b2c Related to Azure B2C library-specific issues msal-angular Related to @azure/msal-angular package msal-browser Related to msal-browser package public-client Issues regarding PublicClientApplications labels Aug 22, 2022
@ghost ghost assigned jo-arroyo Aug 22, 2022
@jo-arroyo
Copy link
Collaborator

@danielvoigt For clarification, is your app causing the browser to be in full-screen mode, or is this in the case when the user chooses full-screen at the browser-level?

@ghost ghost added answered Question has received "first qualified response" Needs: Author Feedback Awaiting response from issue author and removed Needs: Attention 👋 Awaiting response from the MSAL.js team labels Aug 23, 2022
@danielvoigt
Copy link
Contributor Author

danielvoigt commented Aug 24, 2022

@jo-arroyo The popup does not work in full-screen mode when the user chooses full-screen at the browser-level. The app does not cause the browser to be in full-screen mode - but we need to be able to use MSAL for full-screen and non-full-screen browsers.

The redirect is also not happening during a successful login and/or logout. I have to force redirect after a successful login or logout. Since I created workarounds it's not currently a blocker. But the full-screen issue is a major blocker.

@ghost ghost added Needs: Attention 👋 Awaiting response from the MSAL.js team and removed Needs: Author Feedback Awaiting response from issue author labels Aug 24, 2022
@jo-arroyo
Copy link
Collaborator

@danielvoigt Can I confirm that this issue is only happening with macOS users? In my tests the popup window still functions as normal on a Windows machine.

Re: the redirect, are you using the MsalRedirectComponent? How are you handling the redirects?

@ghost ghost added Needs: Author Feedback Awaiting response from issue author and removed Needs: Attention 👋 Awaiting response from the MSAL.js team labels Aug 24, 2022
@danielvoigt
Copy link
Contributor Author

@jo-arroyo Yes, I can confirm that it is happening on macOS. I haven't tested Windows. I was investigating other issues and now see that it is a known issue: #4921. Any idea when a fix can be expected?

@ghost ghost added Needs: Attention 👋 Awaiting response from the MSAL.js team and removed Needs: Author Feedback Awaiting response from issue author labels Aug 24, 2022
@jo-arroyo jo-arroyo added bug A problem that needs to be fixed for the feature to function as intended. duplicate Duplicate issue. and removed question Customer is asking for a clarification, use case or information. b2c Related to Azure B2C library-specific issues msal-angular Related to @azure/msal-angular package bug-unconfirmed A reported bug that needs to be investigated and confirmed answered Question has received "first qualified response" Needs: Attention 👋 Awaiting response from the MSAL.js team labels Aug 25, 2022
@jo-arroyo
Copy link
Collaborator

@danielvoigt Yes, this issue is being investigated for macOS by our team. Closing this issue as it is a duplicate, any workaround or fixes will be tracked and updated on #4921. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A problem that needs to be fixed for the feature to function as intended. duplicate Duplicate issue. msal-browser Related to msal-browser package public-client Issues regarding PublicClientApplications
Projects
None yet
Development

No branches or pull requests

2 participants