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.