Response headers for Easy Auth post to .auth/login/{provider} is not including access-control-allow-origin for the request host and is failing cors checks in browsers

Ryan Noble 10 Reputation points
2026-11-13T16:20:07.3233333+00:00

It seems the options preflight includes the access-control header in the response but the actual post does not. This has taken down the entire feature for our application and anyone relying on it cannot login any more. The browser is showing these logs:
Access to XMLHttpRequest at 'https://testapi.qware.app/.auth/login/google' from origin 'https://test.qware.app' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

POST https://testapi.qware.app/.auth/login/google net::ERR_FAILED 200 (OK)

This issue seems to have started 11/12/2026. Nothing was changed in the application code so I'm assuming this post used to set the access controls for us.

User's imageUser's image

Azure App Service
Azure App Service

Azure App Service is a service used to create and deploy scalable, mission-critical web apps.


2 answers

Sort by: Newest
  1. Ryan Noble 10 Reputation points
    2026-11-17T20:34:03.31+00:00

    Update: I was able to implement a work around that doesn't disrupt the control flow of authentication. If you use Azure Front Door or API Manager you can ensure the control headers are included in the response. I created a simple forwarding API in APIM that adds the access control headers before returning the user information back to the browser client. This is not ideal, since the application is now tightly dependent on APIM for this feature to continue to work for us without making substantial refactors.

    What I would expect is that Easy Auth honors the CORS settings set for the App Service.

    User's image

    Was this answer helpful?

    0 comments No comments

  2. SHOUMIK CHAKRAVARTY 1,535 Reputation points
    2026-11-14T19:59:57.0966667+00:00

    Hi @Ryan Noble - welcome to the Microsoft Azure QnA.

    Thanks for sharing the screenshots and they are helpful.

    The OPTIONS /.auth/login/google preflight succeeds and returns:

    access-control-allow-origin: https://test.qware.app
    access-control-allow-credentials: true
    

    So the browser origin itself appears to be accepted.

    The failure is on the actual POST /.auth/login/google request. That request returns 200 OK, but the response does not include Access-Control-Allow-Origin. From the browser’s perspective the request succeeds, but the response cannot be read.

    Since you mentioned this only started on 11/12 and nothing changed on your side, one possibility is that the POST response previously included those headers and now no longer does. That would explain what you are seeing. The difficulty is that I could not find anything in the Easy Auth documentation that defines the expected CORS behaviour of the /.auth/login/{provider} endpoint. The login flows are documented, the CORS behaviour of that endpoint is not.

    Because that behaviour is undocumented, it is difficult to tell whether this points to a regression introduced around 11/12 or to behaviour that was never formally guaranteed.

    A few things worth checking:

    • Does the same behaviour occur on the default *.azurewebsites.net hostname as well as the custom domain?
    • Does the issue reproduce in another App Service that uses Easy Auth?

    If the behaviour is the same across hostnames and there were no application or configuration changes around 11/12, I would raise a support ticket and provide:

    • The UTC timestamp of a failing request
    • The x-ms-middleware-request-id visible in the response
    • The response headers from both requests

    A workaround while this is investigated

    The documented browser pattern is the server-directed sign-in flow. From the same page, the application “delegates federated sign-in to App Service. This delegation is typically the case with browser apps, which can present the provider’s sign-in page to the user. The server code manages the sign-in process, so it’s also called server-directed flow or server flow.”

    Instead of an XHR POST to /.auth/login/google, navigate the browser directly to https://testapi.qware.app/.auth/login/google. A top level navigation is not a cross-origin request, so CORS does not apply to it.

    I would treat this as a workaround rather than a fix, and test it before relying on it in production.So the browser origin itself appears to be accepted.

    The failure is on the actual POST /.auth/login/google request. That request returns 200 OK, but the response does not include Access-Control-Allow-Origin. From the browser’s perspective the request succeeds, but the response cannot be read.

    Since you mentioned this only started on 11/12 and nothing changed on your side, one possibility is that the POST response previously included those headers and now no longer does. That would explain what you are seeing. The difficulty is that I could not find anything in the Easy Auth documentation that defines the expected CORS behaviour of the /.auth/login/{provider} endpoint. The login flows are documented, the CORS behaviour of that endpoint is not.

    Because that behaviour is undocumented, it is difficult to tell whether this points to a regression introduced around 11/12 or to behaviour that was never formally guaranteed.

    A few things worth checking:

    • Does the same behaviour occur on the default *.azurewebsites.net hostname as well as the custom domain?
    • Does the issue reproduce in another App Service that uses Easy Auth?

    If the behaviour is the same across hostnames and there were no application or configuration changes around 11/12, I would raise a support ticket and provide:

    • The UTC timestamp of a failing request
    • The x-ms-middleware-request-id visible in the response
    • The response headers from both requests

    A workaround while this is investigated

    The documented browser pattern is the server-directed sign-in flow. From the same page, the application “delegates federated sign-in to App Service. This delegation is typically the case with browser apps, which can present the provider’s sign-in page to the user. The server code manages the sign-in process, so it’s also called server-directed flow or server flow.”

    Instead of an XHR POST to /.auth/login/google, navigate the browser directly to https://testapi.qware.app/.auth/login/google. A top level navigation is not a cross-origin request, so CORS does not apply to it.

    I would treat this as a workaround rather than a fix, and test it before relying on it in production.

    Help make this community better for everyone: if this answer resolved your issue, please accept it or leave an upvote. If not, share more details in a comment so we can continue the discussion and find the right solution.

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.