Google API V3 OAUTH2 Problem Report
The GoogleWebAuthorizationBroker.AuthorizeAsync code below works fine on my Windows 8.1. When I install on my Windows 7 PC and run the EXE, the AuthorizeAsync is executed, the browser opens and I click through the Select an account page and the This app would like to: page and then see a page for a short time that says Received verification code. Closing... There is no TokenResponse-user file saved in the ..\AppData\Roaming\Google.Apis.Auth folder and my EXE hangs (waits forever). I have tried with both Chrome and Internet Explorer browsers.
Works fine on Windows 8.1 PC but hangs on Windows 7 PC. I tried two different Windows 7 PCs. The same Client ID/Secret and same Google Username/Password were used on all of the PCs.
Is there something different I should be doing in my code or is this a problem with the Google API V3 client libraries?
Private Async Function GetGredentials() As Task
OAUth2Credential = Await GoogleWebAuthorizationBroker.AuthorizeAsync( _
New ClientSecrets With {.ClientId = Google_ClientID, .ClientSecret = Google_ClientSecret}, _
{YouTubeService.Scope.Youtube}, "user", CancellationToken.None)
End Function
Versions on my PCs:
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Google.Apis" version="1.8.2" targetFramework="net40" />
<package id="Google.Apis.Auth" version="1.8.2" targetFramework="net40" />
<package id="Google.Apis.Core" version="1.8.2" targetFramework="net40" />
<package id="Google.Apis.YouTube.v3" version="1.8.1.1080" targetFramework="net40" />
<package id="log4net" version="2.0.3" targetFramework="net40" />
<package id="Microsoft.Bcl" version="1.1.9" targetFramework="net40" />
<package id="Microsoft.Bcl.Async" version="1.0.168" targetFramework="net40" />
<package id="Microsoft.Bcl.Build" version="1.0.14" targetFramework="net40" />
<package id="Microsoft.Net.Http" version="2.2.22" targetFramework="net40" />
<package id="Newtonsoft.Json" version="6.0.3" targetFramework="net40" />
<package id="Zlib.Portable" version="1.10.0" targetFramework="net40" />
</packages>
The Chrome History shows this but there is no file in the Google.Apis.Auth folder:
9:50 AM OAuth 2.0 Authentication Token Received localhost
9:50 AM Request for Permission accounts.google.com