🐛 fix(gmail): fix token persistence path

- Use the persist_path from the config instead of a hardcoded path to ensure tokens are persisted to the correct location
This commit is contained in:
Jeremiah Russell
2025-10-16 15:29:37 +01:00
committed by Jeremiah Russell
parent 368e78b1cc
commit 73e9eed539

View File

@@ -72,13 +72,14 @@ impl GmailClient {
.build();
let client = Client::builder(executor.clone()).build(connector.clone());
log::trace!("file to persist tokens to `{}`", config.persist_path());
let auth = InstalledFlowAuthenticator::with_client(
config.secret().clone(),
InstalledFlowReturnMethod::HTTPRedirect,
Client::builder(executor).build(connector),
)
.persist_tokens_to_disk(format!("{}/gmail1", config.config_root()))
.persist_tokens_to_disk(config.persist_path())
.build()
.await
.unwrap();