I made an application that has the function of backing up to Google Drive, but it does not work when I put it on some server, it works only in localhost
.
What happens is that it does not open the consent screen on the servers, it follows the code:
var credencial = GoogleWebAuthorizationBroker.AuthorizeAsync(
new ClientSecrets
{
ClientId = clienteID,
ClientSecret = clienteSenha
},
scopes,
NomeUsuario,
CancellationToken.None,
new FileDataStore("C:\temp\items/" + empresaAtiva, true)).Result;
var servico = new DriveService(new BaseClientService.Initializer
{
HttpClientInitializer = credencial,
ApplicationName = "items",
});