feat(authentication): Use flow for installed apps

That way, more complex APIs like drive and calendars
will work without any (sometimes non-existing) workarounds.
This commit is contained in:
Sebastian Thiel
2016-05-20 18:26:48 +02:00
parent cb6679cb2b
commit d37bb19df2

View File

@@ -38,7 +38,7 @@ use cmn::{InvalidOptionsError, CLIError, JsonTokenStorage, arg_from_str, writer_
use std::default::Default;
use std::str::FromStr;
use oauth2::{Authenticator, DefaultAuthenticatorDelegate};
use oauth2::{Authenticator, DefaultAuthenticatorDelegate, FlowType};
use serde_json as json;
use clap::ArgMatches;
@@ -122,7 +122,7 @@ impl<'n> Engine<'n> {
JsonTokenStorage {
program_name: "${util.program_name()}",
db_dir: config_dir.clone(),
}, None);
}, Some(FlowType::InstalledInteractive));
let client =
${self._debug_client(DEBUG_FLAG) | indent_all_but_first_by(3)};