无法使用GSuite APis在WIN10机器上进行身份验证

问题描述 投票:0回答:1

在我的项目中,我使用的是Google apis。它重定向到Web浏览器进行身份验证。但是在WIN 10机器上,我尝试运行相同的代码,它没有重定向到Web浏览器,并且没有任何错误抛出。登录到WIN10计算机的用户是来宾用户,没有任何管理员权限。相同的代码正在其他操作系统上运行。

在Win 10机器上需要更改的可能设置是什么?

这是示例代码。

ClientSecrets   _ClientSecret            = null;
_scopes = new[]{GmailService.Scope.MailGoogleCom};
_ClientSecret                   = new ClientSecrets();
_ClientSecret.ClientId          = m_ClientID;
_ClientSecret.ClientSecret      = m_ClientSecret;
FileDataStore objFileDataStore  = new FileDataStore(m_TokenResponsePath, true);
_userCredentials               = GoogleWebAuthorizationBroker.AuthorizeAsync(_ClientSecret,
                                                        _scopes,p_GAppsUserID,
                                                        System.Threading.CancellationToken.None,
                                                        objFileDataStore).Result;// Geeting stuck on this statement
c# google-api windows-10 google-oauth google-api-dotnet-client
1个回答
0
投票

我能够找出问题所在。机器的管理员用户具有chrome作为默认Web浏览器,并且客户使用IE作为默认Web浏览器。

© www.soinside.com 2019 - 2024. All rights reserved.