[V20 Bug] Google OAuth integration appends port 443 instead of 5001 (redirect_uri_mismatch)

Shap

Customer
Joined
Nov 12, 2023
Messages
8
Reaction score
5
Hi Community,

After updating to the latest 3CX build, I am encountering a redirect_uri_mismatch error when attempting to complete the Google Workspace / SSO integration setup.

In the 3CX Management Console under Google Workspace Integration, the interface explicitly states:

"You will need to copy this URI into the Authorized Redirect URI section in the Google Cloud Console: https://[YOUR_3CX_FQDN]:5001/oauth2google"
However, when clicking on Google login button to launch the Google OAuth flow, 3CX builds and sends an outbound authorization request with port 443 / no port explicitly defined:

redirect_uri=https://[YOUR_3CX<_FQDN]/oauth2google

Has anyone else noticed this discrepancy in the recent update, or is there a patch planned to align the generated URI string with the UI prompt?

Thanks!
 
Last edited:
Hi @Shap we are aware about this in sp10 alpha 2.

Could you please open a support ticket with us so we can apply a patch for you.

Thanks!
 
Last edited:
Hi @Alejandro_3CX,

Thank you for the quick reply.

To confirm my current port configuration shown on the dashboard:

  • HTTP: 5000
  • HTTPS: 5001
Under Integrations > Google, the callback URI displayed in the UI does indeed include port 5001 (https://[YOUR_3CX_FQDN]:5001/oauth2google).

Google SSO had been working seamlessly on this server since initial setup. The issue began immediately after updating to Version 20.0 Update 10 (Build 1621 Alpha - AI 1.6.57).

Upon inspecting the request payload sent when clicking the "Sign in with Google" button on the 3CX login page, the generated parameter drops the port:redirect_uri=https://[YOUR_3CX_FQDN]/oauth2google

Because the URL displayed in the Admin Console contains :5001 while the actual login page generates a request without :5001, Google Cloud rejects the request with Error 400: redirect_uri_mismatch.

Could this be a bug introduced in Build 1621 Alpha regarding how the OAuth redirect URL is constructed?
 
Hi @Shad, could you please open a support ticket with us to apply a patch on this system that will fix it.

Thanks!
 
Dear @Alejandro_3CX , Sorry for dummy question, but when I try to submit a ticket it tells me I have to purchase a ticket. Do I need to do this even for bug report ?
 
Dear @Alejandro_3CX , Sorry for dummy question, but when I try to submit a ticket it tells me I have to purchase a ticket. Do I need to do this even for bug report ?
yes please and we will credit it to your account since it is a bug.
 
Thanks for your confirmation, While this is a company installation, I need to get the accounting confirmation first so it might take 1-2 days. I'll keep you posted as soon as I got the payment done by our accounting and I submitted the ticket.
 
  • Like
Reactions: Alejandro_3CX
@Alejandro_3CX, I managed to submit the ticket #2319530 , Thanks again
 
  • Like
Reactions: Alejandro_3CX
Before people start handwringing about this "bug", let us not forget that only recently did 3cx release ALPHA-2.

It always surprises me that we need to have this conversation over, and over, and over... this is a VERY EARLY NON-PRODUCTION version of 3CX offered for only one purpose -- to allow partners, customers, and developers like us, to get a sneak peak at what MAY be available in a future version of 3CX. It is NOT intended, nor (in my opinion) should it ever be, used in a production environment. If you choose to put these extremely early versions of 3CX into production, you do so at your own risk. You should expect to have hopefully minor issues like this post.

To give context to where this version of 3CX is in the development process, it is typical for new 3CX versions to go through Alpha-1, Alpha-2, Beta-1, Beta-2, Release Candidate 1, 2, and 3, and potentially more steps all before a production release.

I for one am truly grateful that 3CX makes these early versions available FOR TESTING. We have 35+ commercial add-ons for 3CX and many, many more custom solutions, that frequently require updates to maintain compatibility with 3CX. This gives developers extra time to get the needed changes in place before the official release.

Thank you Nick, this is a huge benefit for us and we depend on access to these early versions. I don't know what we would do without these pre-production versions.
 
  • Like
Reactions: Alejandro_3CX