I have an issue where my return URL declared on Azure for an Oauth2 workflow is returned with a port 80 added to it, and of course, there is a mismatch that breaks the authentication.
Here is what is returned: https://login.microsoftonline.com/vmware.com/oauth2/v2.0/authorize?response_type=code&client_id=79be0823-bf61-4d46-9457-e75fa3067d2c&scope=User.Read Mail.Send offline_access&redirect_uri=https://acorro-sandbox.apps.xxx.io:80/dmxConnect/api/O365/Grant.php&state=c2f81bbb3ade2513f1f27002f7d0770802da2badb2b1f84d3c599a6ba1addd55&return_url=https://acorro-sandbox.apps.xxx.io/index.php
It’s the https://acorro-sandbox.apps.xxx.io:80/ that is a problem.
And here is how the step is configured in the API action - I’ve tried both with an without SSL enforced, I get the same behavior.
the code is making a few assumptions that don’t support SSL offloading - it adds back in the ‘local’ port (80 in my case) to the ‘external’ URL (the redirectUrl) believing it to be a ‘custom’ or non-standard port for the HTTPS protocol. The HTTPS flag is generally set to On, even for SSL offloaded sites, but in the latter the traffic is coming from port 80.
Hi!
Please let me know the update on this issue.
Now I also face the same issue and stuck on it.
Kindly advise me if you could successfully done with it.
We should probably do some proxy detection. An other option is to use the web url that you already have set in the project settings to generate the url. We have to think about which option is best. I will make a small update for the proxy detection and post it here later.
NodeJS already has proxy detecting. We set the trust proxy setting to true, so it should get the correct protocol when your proxy sets the X_FORWARDED_PROTO header.
Could you please guide me how I can achieve to work SSL and Oauth2 provider for wappler with node.js project? I want to achieve by hosting node.js project on IIS and also want to use SSIL Oauth2 provider with Azure.
host node.js project on IIS server with reverse proxy and then run pm2
After that, when open O365 login API from IIS server, cannot display Microsoft login page because port is old wappler default port and not IIS port. Other API are OK except that Oauth2