added wizard warning about google passwords

This commit is contained in:
Clément DOUIN 2024-02-04 11:36:11 +01:00
parent a945e1bf2f
commit 35c1453863
No known key found for this signature in database
GPG key ID: 353E4A18EE0FAB72
3 changed files with 16 additions and 2 deletions

View file

@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
### Added
- Added wizard warning about google passwords. [sourcehut#41]
### Changed
- Changed `envelope.watch.{event}.{hook}`: hooks can now be cumulated. For example it is possible to send a system notification and execute a shell command when receiving a new envelope:
@ -900,6 +904,7 @@ Few major concepts changed:
[#419]: https://github.com/soywod/himalaya/issues/419
[#430]: https://github.com/soywod/himalaya/issues/430
[sourcehut#41]: https://todo.sr.ht/~soywod/pimalaya/41
[sourcehut#43]: https://todo.sr.ht/~soywod/pimalaya/43
[sourcehut#54]: https://todo.sr.ht/~soywod/pimalaya/54
[sourcehut#59]: https://todo.sr.ht/~soywod/pimalaya/59

2
Cargo.lock generated
View file

@ -1217,7 +1217,7 @@ dependencies = [
[[package]]
name = "email-lib"
version = "0.21.0"
source = "git+https://git.sr.ht/~soywod/pimalaya#f9a55e764282f1986201e226aacedf13f2e0bc80"
source = "git+https://git.sr.ht/~soywod/pimalaya#ca42096c5537cf15becbb12bf0935381a1ea2908"
dependencies = [
"advisory-lock",
"anyhow",

View file

@ -13,9 +13,9 @@ use email_address::EmailAddress;
use crate::backend::{self, config::BackendConfig, BackendKind};
#[cfg(feature = "message-send")]
use crate::message::config::{MessageConfig, MessageSendConfig};
use crate::ui::THEME;
#[cfg(feature = "account-sync")]
use crate::wizard_prompt;
use crate::{ui::THEME, wizard_warn};
use super::TomlAccountConfig;
@ -63,6 +63,15 @@ pub(crate) async fn configure() -> Result<Option<(String, TomlAccountConfig)>> {
let autoconfig = autoconfig.await?;
let autoconfig = autoconfig.as_ref();
if let Some(config) = autoconfig {
if config.is_gmail() {
println!();
wizard_warn!("Warning: Google passwords cannot be used directly, see:");
wizard_warn!("https://pimalaya.org/himalaya/cli/latest/configuration/gmail.html");
println!();
}
}
match backend::wizard::configure(&account_name, email, autoconfig).await? {
#[cfg(feature = "imap")]
Some(BackendConfig::Imap(imap_config)) => {