问题描述
我创建了一个网站,用户只需在该网站上直接登录到那里的 google drive 并可以在网上共享那里的日期,我还没有使用任何类型的用户身份验证,只是直接创建了凭据并请求用户的谷歌驱动器数据,如上所述 UserCredential 凭证; 使用 (var stream = new FileStream(@"D:\client_secret.json",FileMode.Open,FileAccess.Read)) { String FolderPath = @"D:"; String FilePath = Path.Combine(FolderPath,"DriveServiceCredentials.json");
credential = GoogleWebAuthorizationbroker.AuthorizeAsync(
GoogleClientSecrets.FromStream(stream).Secrets,Scopes,"user",CancellationToken.None,new FileDataStore(FilePath,true)).Result;
}
//Create Drive API service.
Google.Apis.Drive.v3.DriveService service = new Google.Apis.Drive.v3.DriveService(new BaseClientService.Initializer()
{
HttpClientinitializer = credential,ApplicationName = "ABCD",});
我知道没有直接的注销方法,而且我是 Api 集成的新手,所以请提供详细帮助。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)