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

popup flow broken in full-screen macOS #4921

Closed
yoLotus opened this issue Jun 22, 2022 · 43 comments
Closed

popup flow broken in full-screen macOS #4921

yoLotus opened this issue Jun 22, 2022 · 43 comments
Assignees
Labels
answered Question has received "first qualified response" bug-unconfirmed A reported bug that needs to be investigated and confirmed msal-browser Related to msal-browser package Needs: Author Feedback Awaiting response from issue author no-issue-activity Issue author has not responded in 5 days question Customer is asking for a clarification, use case or information.

Comments

@yoLotus
Copy link

yoLotus commented Jun 22, 2022

Core Library

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

Core Library Version

2.26.0

Wrapper Library

Not Applicable

Wrapper Library Version

None

Description

It seems that using the loginPopup function does not work properly on full-screen mode on macOS.
The popup never get closed and the flow fails silently.
When the browser is not in full-screen mode, it always works as expected.

This issue has already been reported in #4839 but even with the library version 2.26.0, it's still not working.
We also tried to follow those instructions but without success.

This example also fails in the same way.

Error Message

We don't get any error neither in the parent window nor the popup.

Msal Logs

Navigated to https://login.live.com/oauth20_authorize.srf?client_id=bbeb7747-ff22-4d91-b4d1-5847e7986bf4&scope=User.Read+email+profile+openid+offline_access&redirect_uri=https%3a%2f%2fadmin.getcontrast.dev&response_type=code&state=eyJpZCI6IjNkOGJjNWY3LTY0ODQtNGJlNi04ZDkwLTRlOTE4MTM5NmQ0ZiIsIm1ldGEiOnsiaW50ZXJhY3Rpb25UeXBlIjoicG9wdXAifX0%3d&response_mode=fragment&nonce=ea4795fd-61eb-414b-a359-d8797cf6ca74&code_challenge=HFjlKBs7AmsVWArHURPcLy7_h8kqv2hK903oVH1-4aw&code_challenge_method=S256&x-client-SKU=msal.js.browser&x-client-Ver=2.26.0&uaid=3dc3690e4b194502b9c13592b9c43424&msproxy=1&issuer=mso&tenant=common&ui_locales=fr-FR&client_info=1&epct=AQABAAAAAAD--DLA3VO7QrddgJg7WevrprbipdRja0-Eq_g8YusVTfzTyimTvpxSMoW2-CWXSL24udMbi7Mf6u_TWzCXQ1gTfvZuGOoQbDjWI1SGJI3KRmn2Q6u0CECf1cy9iuKzql5cOJI75-LL7Qbwnn1R2nWDefsP29mr-FKqFZcgzOJdUD4myTGfCbp6H1n-Z2UeKani_mArk6IIhJjDDSXMcx5oWCKDGDTyFN-mqWvyPV96LyAA&jshs=0&username=xxxxxxx%40outlook.com&login_hint=xxxxxxx%40outlook.com
Navigated to https://login.live.com/ppsecure/post.srf?client_id=bbeb7747-ff22-4d91-b4d1-5847e7986bf4&scope=User.Read+email+profile+openid+offline_access&redirect_uri=https%3a%2f%2fadmin.getcontrast.dev&response_type=code&state=eyJpZCI6IjNkOGJjNWY3LTY0ODQtNGJlNi04ZDkwLTRlOTE4MTM5NmQ0ZiIsIm1ldGEiOnsiaW50ZXJhY3Rpb25UeXBlIjoicG9wdXAifX0%3d&response_mode=fragment&nonce=ea4795fd-61eb-414b-a359-d8797cf6ca74&code_challenge=HFjlKBs7AmsVWArHURPcLy7_h8kqv2hK903oVH1-4aw&code_challenge_method=S256&x-client-SKU=msal.js.browser&x-client-Ver=2.26.0&msproxy=1&issuer=mso&tenant=common&ui_locales=fr-FR&client_info=1&epct=AQABAAAAAAD--DLA3VO7QrddgJg7WevrprbipdRja0-Eq_g8YusVTfzTyimTvpxSMoW2-CWXSL24udMbi7Mf6u_TWzCXQ1gTfvZuGOoQbDjWI1SGJI3KRmn2Q6u0CECf1cy9iuKzql5cOJI75-LL7Qbwnn1R2nWDefsP29mr-FKqFZcgzOJdUD4myTGfCbp6H1n-Z2UeKani_mArk6IIhJjDDSXMcx5oWCKDGDTyFN-mqWvyPV96LyAA&jshs=0&username=xxxxxxx%40outlook.com&login_hint=xxxxxxx%40outlook.com&contextid=A224BC714EFD7E88&bk=1655913753&uaid=3dc3690e4b194502b9c13592b9c43424&pid=15216
Navigated to https://example.com

MSAL Configuration

const msalConfig = {
  auth: {
    clientId: 'bbeb7747-ff22-4d91-b4d1-5847e7986bf4',
    authority: 'https://login.microsoftonline.com/common',
    redirectUri: 'https://example.com',
  },
};

Relevant Code Snippets

const loginRequest = {
  scopes: ['User.Read', 'email', 'profile', 'openid'],
};

const msalInstance = new PublicClientApplication(msalConfig);
const loginResponse = await msalInstance.loginPopup(loginRequest);
msalInstance.setActiveAccount(loginResponse.account);
const tokenResponse = await msalInstance.acquireTokenSilent(loginRequest);

Reproduction Steps

  1. Open the application in full-screen browser
  2. Click the Sign in button
  3. After being redirected to new tab, log in into Microsoft and accept the permission requested by the app

Expected Behavior

After the authentication, the popup is closed and the control is yield back to the parent window.

Identity Provider

Azure AD / MSA

Browsers Affected (Select all that apply)

Chrome, Firefox, Edge, Safari

Regression

No response

Source

External (Customer)

@yoLotus yoLotus 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 Jun 22, 2022
@ghost ghost assigned bmahall Jun 22, 2022
@ghost ghost added the Needs: Attention 👋 Awaiting response from the MSAL.js team label Jun 22, 2022
@github-actions github-actions bot added the msal-browser Related to msal-browser package label Jun 22, 2022
@nianiaJR
Copy link

I faced this problem too, beside I always fail to login when I'm full sceen. Here is the error:
image

@bmahall
Copy link
Contributor

bmahall commented Jun 27, 2022

@yoLotus I am currently looking into this , thanks for your patience!

@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 Jun 27, 2022
@ghost
Copy link

ghost commented Jul 3, 2022

@yoLotus 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.

@ghost ghost added the no-issue-activity Issue author has not responded in 5 days label Jul 3, 2022
@yoLotus
Copy link
Author

yoLotus commented Jul 4, 2022

A comment to just to let this issue opened

@ghost ghost added Needs: Attention 👋 Awaiting response from the MSAL.js team and removed Needs: Author Feedback Awaiting response from issue author no-issue-activity Issue author has not responded in 5 days labels Jul 4, 2022
@ghost
Copy link

ghost commented Jul 10, 2022

This issue requires attention from the MSAL.js team and has not seen activity in 5 days. @bmahall please follow up.

@sumedhdev
Copy link

I'm also having this issue.

@ghost
Copy link

ghost commented Jul 16, 2022

This issue requires attention from the MSAL.js team and has not seen activity in 5 days. @bmahall please follow up.

1 similar comment
@ghost
Copy link

ghost commented Jul 21, 2022

This issue requires attention from the MSAL.js team and has not seen activity in 5 days. @bmahall please follow up.

@sailor
Copy link

sailor commented Jul 21, 2022

I'm also having the same problem.

@ghost
Copy link

ghost commented Jul 27, 2022

This issue requires attention from the MSAL.js team and has not seen activity in 5 days. @bmahall please follow up.

4 similar comments
@ghost
Copy link

ghost commented Aug 1, 2022

This issue requires attention from the MSAL.js team and has not seen activity in 5 days. @bmahall please follow up.

@ghost
Copy link

ghost commented Aug 7, 2022

This issue requires attention from the MSAL.js team and has not seen activity in 5 days. @bmahall please follow up.

@ghost
Copy link

ghost commented Aug 12, 2022

This issue requires attention from the MSAL.js team and has not seen activity in 5 days. @bmahall please follow up.

@ghost
Copy link

ghost commented Aug 17, 2022

This issue requires attention from the MSAL.js team and has not seen activity in 5 days. @bmahall please follow up.

@tlockhart
Copy link

I am experiencing a similiar issue. When logging into my application in full-screen (macOS), msal opens a loginRedirect in a new window, instead of a loginPopup. After log-in, the new window redirects to my sign-in page, instead of the dashboard. When not in full-screen, the loginPopup works just fine.

@ghost
Copy link

ghost commented Aug 23, 2022

This issue requires attention from the MSAL.js team and has not seen activity in 5 days. @bmahall please follow up.

@danielvoigt
Copy link
Contributor

Experiencing the same issue: #5123

@wnuczek
Copy link

wnuczek commented Aug 29, 2022

Recently I've been struggling to get MSAL to work in two of my angular apps.
I've also had this issue with Mac fullscreen but most importantly same thing happened on iOS (tested both Safari and Chrome). The popup wouldn't close and redirect to main app.

Check out redirectUri considerations here as setting blank html as redirectUri fixed both issues for me.

@peterzenz peterzenz assigned sameerag and unassigned jo-arroyo Aug 30, 2022
@peterzenz
Copy link
Contributor

@sameerag I believe you were tracking this item.

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

ghost commented Sep 5, 2022

@yoLotus 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.

@ghost ghost added the no-issue-activity Issue author has not responded in 5 days label Sep 5, 2022
@AK-Loblaw
Copy link

AK-Loblaw commented Sep 9, 2022

@yoLotus, @sameerag, any more details on this? I've been experiencing the same issue. Hoping it doesn't get closed.

@James-Thibaudeau
Copy link

I am also having the same issue, using MSAL.js v2 (@azure/msal-browser) 2.28.3

@sameerag
Copy link
Member

@James-Thibaudeau @AK-Loblaw and @yoLotus
Did the suggestion above by @wnuczek work in your case?

I am picking this issue and will be working with @bmahall to reproduce it.

@sameerag
Copy link
Member

Same as #4458

@rutherfordjp8
Copy link

Having same issue with msal-react. A fix would be much appreciated!

@ghost ghost closed this as completed Sep 28, 2022
@AK-Loblaw
Copy link

@sameerag, sorry for the delay. No, I'm afraid it didn't help in my case.

Was this issue closed due to a fix?

@rutherfordjp8
Copy link

@sameerag @bmahall

Can we please reopen this if there's not been a fix?

@spuyet
Copy link

spuyet commented Oct 3, 2022

We've exactly the same issue here, any ETA for a fix ?

@eqdrs
Copy link

eqdrs commented Oct 3, 2022

I am experiencing the same issue. Is there any update on the fix?

@matEhickey
Copy link

matEhickey commented Oct 3, 2022

Same on my end, @bmahall @sameerag is there any update ?

@chrisneven
Copy link

We're still experiencing the same issue unfortunately. Is there maybe a workaround?

@kostikovk
Copy link

The issue is still existed, why it closed?

@Cambencoil
Copy link

Hey,

i still have the issue : popup flow broken in full-screen macOS
it's been 3 months.
Does anyone could help me?

@kostikovk
Copy link

kostikovk commented Jan 4, 2023

@Cambencoil Hey,

You need to create:

  1. blank.html, this should be just empty html file

image

  1. Add redirectUri to this blank.html file
const msal = new PublicClientApplication({
  auth: {
    clientId: 'id',
    authority: 'authority',
    redirectUri: '/blank.html',
    postLogoutRedirectUri: '/'
  }
})

DOCS

It works for me for the VUE project.

@jorge-d
Copy link

jorge-d commented Jan 6, 2023

Thanks @KosKosovuch ! it did fix the issue on our side 👏🏽

@Gwitchr
Copy link

Gwitchr commented Feb 27, 2023

Very much experiencing this, any chance that @yoLotus solved it ?

@Dario91
Copy link

Dario91 commented Mar 3, 2023

Same here, any news on this issue?

@Prasun-Acharjee
Copy link

Any update on this issue?

@Pro-v-7
Copy link

Pro-v-7 commented Jul 12, 2023

@Prasun-Acharjee create blank.html and put redirectUri: '/blank.html'. this is given in documentation.
https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-browser/docs/initialization.md#redirecturi-considerations

@Prasun-Acharjee
Copy link

@Prasun-Acharjee create blank.html and put redirectUri: '/blank.html'. this is given in documentation. https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-browser/docs/initialization.md#redirecturi-considerations

Thanks!

This worked for me!!!

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answered Question has received "first qualified response" bug-unconfirmed A reported bug that needs to be investigated and confirmed msal-browser Related to msal-browser package Needs: Author Feedback Awaiting response from issue author no-issue-activity Issue author has not responded in 5 days question Customer is asking for a clarification, use case or information.
Projects
None yet
Development

No branches or pull requests