Skip to content

Commit

Permalink
added wizard warning about google passwords
Browse files Browse the repository at this point in the history
  • Loading branch information
soywod committed Feb 4, 2024
1 parent a945e1b commit 35c1453
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 10 additions & 1 deletion src/account/wizard.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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)) => {
Expand Down

0 comments on commit 35c1453

Please sign in to comment.