7

When trying to set up Gmail account using OAuth2 on fresh Thundirbird install I can't get properly authenticated despite providing correct credentials.

With help of the Thunderbird wizard I get all the servers and a new window for OAuth2 is displayed. I log in and two 2 step authentication after which I'm presented with information that I'm about to allow thunderbird to receive, send email etc.

After I click allow the thunderbird displays "Authentication failure while connecting to server imap.gmail.com".

1
  • This is the only actual solution which gives anything close to a "reason", other supposed "answers" simply involve uninstalling Thunderbird. It's not a version problem at all.
    – Thufir
    Feb 27, 2020 at 13:13

5 Answers 5

10

Solution suggested in this thread solved my problem.

It seems, that gmail fails authentication when it detects useragent of inbuilt thunderbird browser. The solution is to set"general.useragent.compatMode.firefox" property to true. This is done with config editor (Edit-Preferences-Advanced-General-Config Editor.)

1
  • Correct. Only correct answer I found, re-installing Thunderbird isn't required.
    – Thufir
    Feb 27, 2020 at 13:14
1

For me, no other suggestions worked, but https://support.mozilla.org/xh/questions/1183589 put me on the right path (although not exactly my situation).

Try my suggestion if the following applies:

  1. You've selected Oauth2 as the authentication scheme and tried logging in with Oauth2. You still get the error message. Removing passwords has allowed you to log in again, but the problem persists.
  2. When you show the saved passwords (Preferences -> Security -> Saved passwords), it lists your username as "myaccount" instead of "[email protected]" - it does not show the full email address.
  3. If you manually edit the username (right click -> Edit Username), Thunderbird will prompt you to login again. If you do so, it adds a new entry to the list, with the username "myaccount" instead of "[email protected]".

NOTE: This was the last thing I tried after a wide range of failed attempts at following suggestions - so I'd already tried everything from enabling IMAP in gmail to removing saved passwords to editing the configurations and setting the general.useragent.compatMode.firefox property. Those changes may be enough to solve your problem, or they may be necessary but not sufficient requirements for my solution to work.

Solution:

  1. Go to the config editor (Preferences -> Advanced -> Config Editor)
  2. Search for "username" - this should bring up a few results, one or more of which may have the value "myaccount" instead of "[email protected]". For me, this was "mail.server.server1.userName".
  3. Change the offending username to contain the full email address.
  4. If necessary, delete your passwords and log in again using Oauth2.

If you've tried everything else with no luck, hopefully this finally does it :)

0

Or update to 68.2.1 for the fix.

0
0

I've solved this problem. I also had an issue with this and it took me a long time to figure it out so I made a video how to fix it and you can find the SOLVED video here on YouTube: https://youtu.be/bu3QkC9HhVw This was a very unique issue when you have had multiple password updates in Gmail and Thunderbird is storing the old passwords that are conflicting with your new password which may be inhibiting you from entering your new password into Thunderbird.

2
  • Welcome to Super User! Please quote the essential parts of the answer from the reference link(s), as the answer can become invalid if the linked page(s) change.
    – DavidPostill
    Apr 6, 2020 at 7:34
  • You may need to delete old passwords in Thunderbird when updating the passwords in Gmail... It is a bit hard to find where those passwords are stored though so you need to watch the video that shows exactly how / where the passwords are stored... As per previous: This was a very unique issue when you have had multiple password updates in Gmail and Thunderbird is storing the old passwords that are conflicting with your new password which may be inhibiting you from entering your new password into Thunderbird.
    – Mike Smith
    Apr 7, 2020 at 8:32
0

I ran into a similar problem and found that in my case, the issue was that I'd turned off cookies in Thunderbird's Privacy & Security settings. I turned them back on long enough to connect to Gmail via OAuth. Thunderbird only needs to accept cookies for the authentication step -- once the account is set up, you can turn cookies off again and it'll still be connected.

1
  • 1
    As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.
    – Community Bot
    Nov 6, 2023 at 18:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .