-
Notifications
You must be signed in to change notification settings - Fork 144
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
[Bug] OPTIONS preflight check is beaking the connection #803
Comments
Hello @sgadot : By 'the app is in production', does that mean it had been working for some time and the issue started happening recently? Did it start happening after updating Chrome/Brave/Edge? We've had some other customers report issues in the latest Chrome due to some overly cautious checks that Chrome considers a bug (#801). However, unlike that issue this preflight check might be an intended change that we'll have to handle in MSAL. |
Tested this on the latest Chrome and cannot repro either: That being said, I did reproduce the issue by halting the app execution before the request is done, and issuing an |
Hi @Avery-Dunn , Yes that's it. It was working for some time and suddently stopped working. I havent seen any particular update on my browser, but since it's updating automatically in the background, that does not mean much...
This looks indeed very similar to #801 and would explain why the issue does not always happen on every computer in my office. => I would recommend doing what @localden suggested, even if the problem is not purely a MSAL4J issue, but might rather be an issue with Chrome. Thanks a lot for your time guys, much appreciated ! |
Hello, we had the same Problem with Microsoft Edge 123. The Version 122 works perfectly. We've done a QuickFix in AuthorizationResponseHandler.handle(HttpExchange httpExchange) and added a check to skip the handling if the request is not "get" or "post" to ignore the new "options" request on / by Edge 123. |
Thanks folks - we're looking into the issue! We might need to be a bit more explicit about handling HTTP verbs. |
Library version used
1.14.3
Java version
--
Scenario
Other - please specify
Is this a new or an existing app?
The app is in production, I haven't upgraded MSAL, but started seeing this issue
Issue description and reproduction steps
The context :
Third party app using MSAL4J for database Auth is trying to connect to a database using Microsoft JDBC driver.
This has been reproduced using :
Login and navigation has been tested with
The flow is as follow
ERROR Microsoft Authentication 4:2 com.microsoft.aad.msal4j.MsalClientException: No Authorization code was returned from the server
Relevant code snippets
No response
Expected behavior
OPTION Preflight check from the browser should be ignored and it should wait for the real POST payload
Identity provider
Microsoft Entra ID (Work and School accounts and Personal Microsoft accounts)
Regression
No response
Solution and workarounds
Things are OK if the browser does not perform preflight check
The text was updated successfully, but these errors were encountered: