Http/https protocols issue

I am using Cloud Azure with https protocol and in the login servlet am getting the proper authorize URL with correct callback URL which has https but in the logs i see below exception

Caused by: com.auth0.exception.APIException: Request failed with status code 403: The redirect URI is wrong. You sent http://xxx.yyy.UUUU.azure.com, and we expected https://xxx.yyy.UUUU.azure.com

But in the call back URL i see it is having correct protocol https but as per the exception it says the callback URL is having only http.

Everything works when i am using http://localhost:8080

Can someone please advice me, if am missing something in the configuration

:wave: @dinmat

It’s possible you trigger a login with a request with /authorize?response_type=code&...&redirect_uri=http://example.com and upon receiving the code, your backend tries to make a request to /oauth/token but using https://example.com as the redirect_uri, resulting in a code that was issued for a different redirect_uri, which is usually the case with the error you mentioned. So, it might be that you have set to automatically use the scheme / protocol of your server application, for example running HTTP, instead of using the one that is configured in your application.