Description
There is frequent error when authenticating user through GoogleWebAuthorizationBroker.AuthorizeAsync method. The authentication page is correctly displayed but after confirming application access the browser hangs on "Page Not Found" (localserver:portnumber). But, both tokens are successfully transmitted back to the application. This problem is more frequent when authenticating through proxy.
Hotfix: I did some research and replaced the code with my own copy of LocalServerCodeReceiver. The problem is that HttpListener closes before the response is delivered. I've made quick hotfix by placing Thread.Sleep(10) on the line 99 in the original file (after closing the response stream and before returning instance of AuthorizationCodeResponseUrl). There is probably more elegant way how to fix this but I have no more time to search for correct fix.