Remove Port from Redirect URI for Social Logins (Office 365)

So I’m trying to set up login with office 365 and have done everything needed, yet kept getting an error from microsofts end, then I realised ERPnext is supplying the wrong Redirect URI as it has the port 8000 attached the URL (***)

How can I change this to be just*** ?

I’m using ERPnext through docker on Plesk

You can fix this by setting host_name, e.g. bench --site xxxx set-config host_name

to get rid of the port at the end of your hostname, include the following to your site-confige.json

“restart_supervisor_on_update”: true,
“restart_systemd_on_update”: true,

or set it using
bench --site {{site-name}} set-config restart_supervisor_on_update 1
bench --site {{site-name}} set-config restart_systemd_on_update 1