[Users] Gmail OAuth2 Authorization Errors
Dustin Miller
dustbiz at gmail.com
Thu Apr 14 03:40:07 UTC 2022
On Wed, 13 Apr 2022 19:40:56 -0700
Geoffrey Leach <geoff at hughes.net> wrote:
> Your assumptions are correct. That was exactly what I was doing.
> Adding @gmail.com to the user id shows my level of desperation.
>
DM: From my experience, this is optional with Gmail. One way I test it
is to see what works for signing in to a mail server's webmail
interface.
>
> So, I removed the (gmail) passwords from the password fields of the
> Basic and Send panels of the Claws Configuration of the user I'm using
> to test my understanding. The (gmail) User Id remains (without
> @gmail.com).
>
> Claws accepts this configuration, but not with empty User Id.
>
DM: Yes, that makes sense, and is how mine is set up as well.
>
> On the OAuth2 panel, Client Id, Client Secret and Authorization Code
> are as obtained from Google.
>
DM: After removing your normal Gmail account passwords as mentioned
above, on the 'OAuth2' panel, did you click on the 'Authorize' in the
'Complete authorization' section? This is what populates the two
'Password' field with the OAuth2 'password'. You can check this by
going back to the 'Basic' and 'Send' panels. If the password fields
there are empty, it won't work; if they show a long string of dots and
then when you click to show the password, a long string of
miscellaneous characters, then that means that part of the setup is
okay.
>
> On sending the test email, Claws prompts me for the password for
> smtp.gmail.com.
>
DM: This is a sign that something is wrong with your setup, since you
won't be prompted to enter a password when using OAuth2.
>
> Entering the password for the gmail user id, results in a network
> trace as before.
>
> What did I miss?
>
DM: Based on this last part of your email, I would recommend first
looking at the 'OAuth2' FAQ page's
(https://www.claws-mail.org/faq/index.php/Oauth2) first section ('Claws
Mail Account Settings for OAuth 2.0') to make sure that your
OAuth2-related settings are correct on the 'Receive' and 'Send' panels.
HTH, ---Dustin
>
>
> On Wed, 13 Apr 2022 13:28:25 +0600
> Dustin Miller <dustbiz at gmail.com> wrote:
>
> > On Tue, 12 Apr 2022 16:31:58 -0700
> > Geoffrey Leach <geoff at hughes.net> wrote:
> >
> > > Another bump in the road. Network log below.
> > >
> > > Username is that that was used during the registration process.
> > >
> > > Password verified. I assume that '@gmail.com' is not part of the
> > > password.
> > >
> > > Username and password were used to log in to the gmail account,
> > > off of the error diagnostic page from google.
> > >
> > > The credentials were copied from the google pages using their
> > > 'copy to clipboard' links. They looked correct, but I will
> > > confess that I did not do a byte-by-byte comparison.
> > >
> > > Suggestions as to how to resolve the problem?
> > >
> > DM: Hi, Geoffrey. Am I understanding right that you are trying to
> > use your Gmail login password in one or more of the password fields
> > in the Claws Mail settings? Note that if you are using OAuth2, then
> > you should not manually enter anything in these password fields,
> > since the OAuth2 setup / authorization process will populate these
> > for you. So try just leaving them empty, then go through the OAuth2
> > setup process, and then go back and check them to make sure they've
> > been auto-populated. If they have, then I think things should work
> > as expected for you. HTH, ---Dustin
> > >
> > > Thanks.
> > >
> > > * OAuth2 trying for fresh access token with auth code
> > > * OAuth2 access token not obtained
> > > * OAuth2 refresh token not obtained
> > > * OAuth2 access token not obtained
> > > * Account 'gmail': Connecting to SMTP server:
> > > smtp.gmail.com:465... [2022-04-12 14:45:15] SMTP< 220
> > > smtp.gmail.com ESMTP a21-20020aa780d5000000b005059fdae5
> > > [2022-04-12 14:45:15] ESMTP> EHLO webster [2022-04-12 14:45:15]
> > > ESMTP< 250-smtp.gmail.com at your service, [98.97.35.136]
> > > [2022-04-12 14:45:15] ESMTP< 250-SIZE 35882577 [2022-04-12
> > > 14:45:15] ESMTP< 250-8BITMIME [2022-04-12 14:45:15] ESMTP<
> > > 250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER
> > > [2022-04-12 14:45:15] ESMTP< 250-ENHANCEDSTATUSCODES [2022-04-12
> > > 14:45:15] ESMTP< 250-PIPELINING [2022-04-12 14:45:15] ESMTP<
> > > 250-CHUNKING [2022-04-12 14:45:15] ESMTP< 250 SMTPUTF8
> > > [2022-04-12 14:45:15] ESMTP> [AUTH XOAUTH2]
> > > [2022-04-12 14:45:15] ESMTP< 334
> > > eyJzdGF0dXMiOiI0MDAiLCJzY2hlbWVzIjoiQmVhcmVyIiwic2NvcG [2022-04-12
> > > 14:45:15] ESMTP> MAIL FROM:<SUSLEA491 at GMAIL.COM> SIZE=334
> > > [2022-04-12 14:45:15] SMTP< 535-5.7.8 Username and Password not
> > > accepted. Learn more at [2022-04-12 14:45:15] SMTP< 535 5.7.8
> > > https://support.google.com/mail/?p=BadCredential ** error occurred
> > > on authentication *** Authentication failed:
>
More information about the Users
mailing list