1

Is there a way to force GoogleWebAuthorizationBroker.AuthorizeAsync to use a specific browser for verifying application permissions?

I have an environment where Chrome will be installed on all users' machines, however it is not guaranteed to be the default browser; the implementation requires the OAuth confirmation to always happen in Chrome (for reasons that are above my pay grade).

I'm using:

var task = GoogleWebAuthorizationBroker.AuthorizeAsync(
           new ClientSecrets { 
               ClientId = clientId, 
              ClientSecret = clientSecret
           }
           , scopes
           , userName
           , CancellationToken.None
           , new FileDataStore(FileDataStoreFolderName)
 );

There is, however, no mention of passing an executable name in the API docs so my guess is that I'm going to have to write a custom AuthorizeAsync method, however I remain optimistic that I'm wrong in this case.

Mukesh Ram
  • 6,248
  • 4
  • 19
  • 37
adamdc78
  • 1,153
  • 8
  • 18
  • I would prevent your users in the browser if the user agent [is not chrome](http://stackoverflow.com/questions/4565112/javascript-how-to-find-out-if-the-user-browser-is-chrome). – Tholle Aug 09 '16 at 20:06
  • @Tholle the problem is that the AuthroizeAsync call is the one launching the url in the default browser (as far as I can tell, my C# application doesn't have access to the url). The URL is likewise, maintained by Google. – adamdc78 Aug 09 '16 at 22:36

0 Answers0