Auth0 not working with https for Asp.net MVC 5

My ASP.NET MVC5 application has https enabled till the load balancer (AWS), and http behind it. When I try to authenticate using auth0, I am getting an error.

I do understand that the problem is because the application auth0 thinks that the application is only using http. Do you know what is the easy way around it without enabling end to end encryption?

Please do let me know if there is an easy solution to this. Any solution would be deeply appreciated.

If the issue is with callback URL’s being generated for the wrong scheme (HTTP) instead of (HTTPS) then you should check this other answer. It’s not for the same exact technology stack, but the theory behind it is the same, in particular, you’ll likely have to configure you application in a more explicit way in order to override the defaults that use whatever scheme/host/port with which the application is technically accessed.

The answer focused on just overriding the scheme to always be HTTPS, but you may also need to override the host because in your situation it may also differ. A definitive resolution is to just include the full URL instead of trying to build it dynamically as mentioned in one of the comments. If your situation is not related to callback URL’s then please update the question with more exact details-

Hola folks, I had initially posted the questions. After some research I was able to find a solution that worked for me over here: owin - Facebook Login recommending to require HTTPS - How to Configure HTTP redirect URL for Facebook Login in ASP.NET MVC? - Stack Overflow

The issue in the above question was with FB and not Auth0, but the problem is similar, and the solution seems to work. Hope this helps.