Hi @Harsh
Thank you for posting your issue on Microsoft Q&A.
I understand that you are encountering 502 Bad Gateway Error for OAuth2 Callback on AWS Deployment.
The error 502 Bad gateway which comes from the server. Based on your trials I found this is working in your local machine perfectly fine but when it is deployed in AWS you have started facing the issue. This might be because the local machine does work with internal connectivity as there is no external connectivity required. Whereas to reach AWS it may need to connect over a public internet which may need to be checked your connectivity configuration. This may result in connectivity breakdown and resulted in no response situation from server.
For troubleshooting follow the document: https://learn.microsoft.com/en-us/azure/application-gateway/application-gateway-troubleshooting-502?source=recommendations#request-time-out Hope this helps. Do let us know if you have any further queries.
If this answers your query, do click `Accept Answer`
and `Yes`
.
Thanks,
B. Siri Chandana.