thunderbird / thunderbird-android

Thunderbird for Android – Open Source Email App for Android (fka K-9 Mail)
https://thunderbird.net/mobile
Apache License 2.0
10.97k stars 2.51k forks source link

Support different OAuth tokens for outgoing/incoming servers (e.g. Outlook with Microsoft Authenticator not working) #8417

Open Gitoffomalawn opened 2 weeks ago

Gitoffomalawn commented 2 weeks ago

Checklist

App

K-9 Mail

App version

6.804

Where did you get the app from?

Google Play

Android version

LineageOS, Android 12

Device model

No response

Steps to reproduce

  1. Have an Outlook account with Microsoft Authenticator enabled
  2. Open K-9, go to settings, and tap "Add account"
  3. Go through account setup steps

Expected behavior

K-9 should be prompted twice for a password and Authenticator code: once for the incoming server settings, and once for the outgoing server settings. After entering the password twice, and passing the second Authenticator challenge, the server settings should be imported, and the account available in the app.

Actual behavior

K-9 is only prompted for the first password and Authenticator challenge. This causes it to not receive the outgoing server settings, which causes account enrollment in K-9 to fail.

Logs

Screenshot_20241026-083932_K-9 Mail

Gitoffomalawn commented 2 weeks ago

Update: downloaded the Thunderbird app released today. This issue is also present there. Steps to reproduce and the result are the same.

kewisch commented 2 weeks ago

Unfortunately this won't be a quick fix, if it is what I think it is then it is because we only support one OAuth token per account. If incoming and outgoing server use two different mechanisms for auth (and it sounds like this is the case for you), then it won't work.