Using Google OAuth2 API Client Library for .NET how to override port?

I am using the Google API Client Library for .NET and everything works well on my local machine. My test environment is behind a load balancer. The way this site is configured is treated as https: // and the load balancer forwards port 443 to port 81. The user doesn't see ahead, they see https: // without a port number.

When the library generates URLs for redirection, etc., it adds the port number to the URLs. This means that after authorization, it redirects the url with the appended: 81. Since the load balancer does not know about port 81, this fails.

Overriding GoogleAuthorizationCodeFlow and removing: 81 from RedirectUri results in error: "redirect_uri_mismatch". I think it probably has to do with the callback querystring containing the state with port 81 inches.

I know from an earlier question that state is only readable in this library, so I am stuck.

+3


source to share





All Articles