diff --git a/deltachat-jsonrpc/src/api/types/login_param.rs b/deltachat-jsonrpc/src/api/types/login_param.rs index 72b8fd66b1..36d6ed9ffc 100644 --- a/deltachat-jsonrpc/src/api/types/login_param.rs +++ b/deltachat-jsonrpc/src/api/types/login_param.rs @@ -122,6 +122,7 @@ impl TryFrom for dc::EnteredLoginParam { password: param.smtp_password.unwrap_or_default(), }, certificate_checks: param.certificate_checks.unwrap_or_default().into(), + oauth2: false, }) } } diff --git a/src/login_param.rs b/src/login_param.rs index 723621b432..1f1c0eb284 100644 --- a/src/login_param.rs +++ b/src/login_param.rs @@ -140,6 +140,10 @@ pub struct EnteredLoginParam { /// TLS options: whether to allow invalid certificates and/or /// invalid hostnames pub certificate_checks: EnteredCertificateChecks, + + /// Deprecated 2026-07, always false + #[serde(default)] + pub oauth2: bool, } impl EnteredLoginParam { @@ -235,6 +239,7 @@ impl EnteredLoginParam { password: send_pw, }, certificate_checks, + oauth2: false, }) } @@ -396,6 +401,7 @@ mod tests { password: "".to_string(), }, certificate_checks: Default::default(), + oauth2: false, }; param.save_legacy(&t).await?; assert_eq!( diff --git a/src/qr.rs b/src/qr.rs index 4059382753..9a07249555 100644 --- a/src/qr.rs +++ b/src/qr.rs @@ -841,6 +841,7 @@ pub(crate) async fn login_param_from_account_qr( }, smtp: Default::default(), certificate_checks: EnteredCertificateChecks::Strict, + oauth2: false, }; return Ok(param); } @@ -860,6 +861,7 @@ pub(crate) async fn login_param_from_account_qr( }, smtp: Default::default(), certificate_checks: EnteredCertificateChecks::Strict, + oauth2: false, }; Ok(param) diff --git a/src/qr/dclogin_scheme.rs b/src/qr/dclogin_scheme.rs index 97e06ceb87..5ef2c47ab2 100644 --- a/src/qr/dclogin_scheme.rs +++ b/src/qr/dclogin_scheme.rs @@ -196,6 +196,7 @@ pub(crate) fn login_param_from_login_qr( password: smtp_password.unwrap_or_default(), }, certificate_checks: certificate_checks.unwrap_or_default(), + oauth2: false, }; Ok(param) } diff --git a/src/transport.rs b/src/transport.rs index 1d4f54b35e..c2ef62260f 100644 --- a/src/transport.rs +++ b/src/transport.rs @@ -212,6 +212,10 @@ pub(crate) struct ConfiguredLoginParamJson { pub smtp_password: String, pub certificate_checks: ConfiguredCertificateChecks, + + /// Deprecated 2026-07, always false + #[serde(default)] + pub oauth2: bool, } impl fmt::Display for ConfiguredLoginParam { @@ -488,6 +492,7 @@ impl From for ConfiguredLoginParamJson { smtp_password: configured_login_param.smtp_password, certificate_checks: configured_login_param.certificate_checks, + oauth2: false, } } } diff --git a/src/transport/transport_tests.rs b/src/transport/transport_tests.rs index f31661ca06..ec44a7bfd0 100644 --- a/src/transport/transport_tests.rs +++ b/src/transport/transport_tests.rs @@ -52,7 +52,7 @@ async fn test_save_load_login_param() -> Result<()> { .clone() .save_to_transports_table(&t, &EnteredLoginParam::default(), time()) .await?; - let expected_param = r#"{"addr":"alice@example.org","imap":[{"connection":{"host":"imap.example.com","port":123,"security":"Starttls"},"user":"alice"}],"imap_folder":"Folder","imap_user":"","imap_password":"foo","smtp":[{"connection":{"host":"smtp.example.com","port":456,"security":"Tls"},"user":"alice@example.org"}],"smtp_user":"","smtp_password":"bar","certificate_checks":"Strict"}"#; + let expected_param = r#"{"addr":"alice@example.org","imap":[{"connection":{"host":"imap.example.com","port":123,"security":"Starttls"},"user":"alice"}],"imap_folder":"Folder","imap_user":"","imap_password":"foo","smtp":[{"connection":{"host":"smtp.example.com","port":456,"security":"Tls"},"user":"alice@example.org"}],"smtp_user":"","smtp_password":"bar","certificate_checks":"Strict","oauth2":false}"#; assert_eq!( t.sql .query_get_value::("SELECT configured_param FROM transports", ())