Page 1 of 1

HESK installed on IIS webserver

Posted: Mon Sep 23, 2024 4:08 pm
by Chav
Hello,

I have installed this solution on a web server running IIS.

My issue stands at OAuth as when I try to click verify, the redirect_uri is "http" rather than "https" despite it being "https" in Azure Entra.

When adding the providers initially, the redirect url provided at the top of the form was in "https" format as well.

I have exhausted all efforts and now find myself here. Your prompt response is greatly appreciated.

Re: HESK installed on IIS webserver

Posted: Mon Sep 23, 2024 9:54 pm
by Klemen
First, make sure you have a SSL certificate installed on your help desk. If it's a local server, you can use a self-signed certificate and add an exception in your browser to avoid warnings.

Then, make sure you open the "OAuth" page (Hesk admin panel > Tools > Oauth Providers") using https and not http. When using https, the "Your OAuth Redirect URI for Hesk is:" URL should be the https one.

You may also need to enable the "Do not validate server certificates" option when adding/editing a provider, if your local server doesn't have up-to-date trusted certificates configured properly.

That should work in most cases. If you run into any specific errors, post them here.

Re: HESK installed on IIS webserver

Posted: Wed Sep 25, 2024 1:43 pm
by Chav
Hi Klemen,

I ensured I followed all the steps listed below and I still have the same issue.

As seen in the image shared in the link below, when I create a New Provider the redirect_uri here is HTTPS, which makes this "bug" more confusing.
https://ibb.co/GHSW3vS

I decided to analyze the PHP code for the Oauth Providers page and found the function hesk_get_oauth_redirect_url(). That is where the issue lies as this function is getting the HTTP URL rather than HTTPS.

I would like to know where that function is getting the URL from.

Re: HESK installed on IIS webserver

Posted: Wed Sep 25, 2024 3:15 pm
by Klemen
That function gets the URL from the $hesk_settings['hesk_url']

Check your Admin panel > Settings > General and make sure the "Help desk URL" is set to HTTPS rather HTTP, then try again.

Re: HESK installed on IIS webserver

Posted: Wed Sep 25, 2024 3:25 pm
by Chav
That was it !!!!

I can finally breathe after weeks of troubleshooting.

I really appreciate your help. Thanks.