julian-alarcon / prospect-mail

Prospect is an Outlook mail desktop client powered by Electron
MIT License
460 stars 66 forks source link

[Bug]: Duo Authentication Box Does Not Appear #299

Open sr66139p opened 1 year ago

sr66139p commented 1 year ago

Describe the bug The Duo 2FA box does not appear, preventing me from logging in

To Reproduce Steps to reproduce the behavior:

  1. Go to open the app
  2. Try to sign in with an account protected by Duo
  3. Go to your domain's login page

Expected behavior I expect a textbox to appear allowing me to enter my 2FA code. I also expect a checkbox that says "Don't ask again for 6 days"

Screenshots If applicable, add screenshots to help explain your problem. image

Desktop (please complete the following information):

Additional context Add any other context about the problem here. Also, did you tried another build (AppImage, deb, rpm)? I tried an older deb 0.3.0

LockedThread commented 1 year ago

I also have this problem at my University. I guess it's back to the web version.

zeitounator commented 1 year ago

I have a similar problem with a company saml login page. The email signin box correctly takes me to the saml page but that page shows "you will be redirected in a few seconds" for ever and I can't use the app anymore.

As a first debugging step for some obvious things I could think of, I checked the user agent used by prospect-mail. If I'm not wrong is is set in the code as "chrome". I installed a user-agent switcher on firefox and used the same string: everything works as expected on the web version.

zeitounator commented 1 year ago

As a workaround to what looks like the same problem (see my latest comment), I have iteratively downgraded from 0.5.1 -> 0.4.0 and problem is gone. Interestingly enough this has also fixed #298

zeitounator commented 1 year ago

Although my first test under firefox above is non conclusive, I strongly suspect the regression has been introduced by https://github.com/julian-alarcon/prospect-mail/commit/b0a7d6ed4b4a8dc00f7e037819ba511b1841d9d3 when changing the UserAgent. Let me know if I can do anything to test and help debugging this issue in order to fix it. Thanks.

Alyssa4854 commented 1 year ago

I had a similar issue.

I can login through my org's SSO page and proceed to duo. The title bar would indicate it moved to the Duo page, but the page itself remained entirely white and unloaded. I never encountered a redirect page - straight from SSO to Duo prompt.

Clicking Reload in the toolbar menu for Prospect Mail would reload the page but would result in a Page access not allowed error (duo error).

I can also verify that the issue isn't present in 0.4.0. It works just fine.

duo_error

julian-alarcon commented 1 year ago

Can you try the latest 0.5.2 version available (.deb, AppImage, rpm, etc): https://github.com/julian-alarcon/prospect-mail/releases/tag/v0.5.2

If you are using snap, you can also try the current beta channel: sudo snap refresh prospect-mail --channel=beta

8bitZeta commented 1 year ago

This is still an issue in the latest release, @julian-alarcon

The easiest fix is to set contextIsolation to true (which is the default since Electron 12). I've tested this on a local copy already, and it worked just fine.

zeitounator commented 1 year ago

Although I login on a different saml page, this isn't fixed for me either (tested with 0.5.3). Easy test case: try to login with email what.ever@laposte.fr. You will be directed to the saml entry page where you can wait for ever for a javascript redirection and form never shows up. Rolled back again to 0.4.0.

@julian-alarcon : Let me know if it's ok to still follow this point here or if I should create a separate issue. @8bitZeta : care to share the changes you made to test contextIsolation? I'd like to test as well if it fixes my a bit different issue. Thanks.

rejinjoy18 commented 1 year ago

I had the same issue, 0.5.2 and 0.5.3 did not fix my problem. Reverting back to 0.4.0 fixed it for me.

8bitZeta commented 1 year ago

@zeitounator, go to src/controller/mail-window-controller.js and comment out line 93...

That line should be contextIsolation: false... Commenting it should enable contextIsolation...

That's the only change I made to get my Duo to work.

zeitounator commented 11 months ago

Sorry for the long delay. For memory: my problem is not exactly the one described in this ticket but similar (i.e. a SAML login redirect page is not followed and displayed).

After login in successfully a few weeks ago with version 0.4.0, snap upgraded the package again to latest prospect-mail and I was able to run since then on the stored credentials. I had to rotate my password last Friday and the bug strikes me again this morning. So I took the time to test.

I checked out the latest git version on main branch and started (i.e. yarn && yarn start). After entering my mail on Microsoft form I get directed to my company SAML page showing "Please wait" for ever and I'm stuck.

I then applied the fix from @8bitZeta above (i.e. remove line 93 contextIsolation: false in src/controller/mail-window-controller.js ) and start again. This time I'm able to proceed all the way through saml authentication.


Edit: Redirecting this to the more generic #312 issue and the #314 implementation which fixes the issue.

erik-wroldsen commented 2 months ago

Hi, I have a similar problem using Prospect Mail 0.5.4 and a freshly installed Ubuntu 24.04.1 LTS

2024-09-10 10_29_06-image (2) png 2024-09-10 10_29_44-image (1)

image

zeroz41 commented 3 days ago

Same problem on 0.5.4 on arch linux. After org sign in "Duo Security - Two Factor Authentication" page is blank white screen and never loads, making this unusable. Reproduced many times.