Make helpers that read from disk async

This commit is contained in:
Glenn Griffin
2019-11-21 09:14:30 -08:00
parent 1d25341c66
commit 8e38d3976b
7 changed files with 39 additions and 27 deletions

View File

@@ -6,6 +6,7 @@ use tokio;
#[tokio::main]
async fn main() {
let app_secret = yup_oauth2::read_application_secret(path::Path::new("clientsecret.json"))
.await
.expect("clientsecret");
let auth = DeviceFlowAuthenticator::builder(app_secret)
.persist_tokens_to_disk("tokenstorage.json")