[Users] Gmail OAuth2 Authorization Errors

David Fletcher David at megapico.co.uk
Wed Apr 13 12:02:01 UTC 2022


> > > * ?If you?re the app developer, make sure that these request details
> > >   comply with Google policies.
> > > redirect_uri: urn:ietf:wg:oauth:2.0:oob  
> > 
> > I'm working on an update - I posted the first code to fix this
> > yesterday on the Claws Mail developer list. However, that code was
> > just a proof of how to overcome the problem - it needs integration
> > into the Claws sources and testing to make sure it works properly.
> > It's going to take a little time to work through fixing this.
> > 
> DM: Hi, David. Thanks for your reply, and I really appreciate the
> explanation (have a vague memory of you mentioning a bit of this before
> on this list), as well as knowing that you're working on an update
> related to this. If you would update this list once it gets into git,
> there's a chance I might try it out and could help with testing if
> needed. (Or maybe there's a way for me to subscribe to a list for commit
> updates where I could watch for related changes?)
> >  
> > Are there other Gmail login methods open to you in the short term?
> > 
> DM: Yes, using it with 'Testing' status still works. Could also go back
> to straight POP until the deadline in May when they'll require OAuth2.
> Worst case, there's always the webmail interface. :) Thanks for your
> continued work on this. Cheers, ---Dustin

Hi Dustin, Richard, Rosemary, Brian,

Here's the info on fixing the Google Oauth2 deprecation issue (I'm
assuming you are compiling Claws Mail from source):

(1) Replace
    "urn:ietf:wg:oauth:2.0:oob",
with
   "https://127.0.0.1:8888",
on line 50 of claws-mail/src/oauth2.c

(2) Compile Claws Mail as normal.

(3) Set up your account as normal.

(4) Oauth2 authorization - Use the normal Open default browser button, or
copy the code to your browser. Go through the Google authorization
process as normal. After completing this Google will forward you to a
web page that does not exist (see example screen attached). Copy the
authorization code out of the URL and into the Claws Mail Authorization
Code box. Make sure to copy just the code, not the whole URL, e.g. from
the URL
https://127.0.0.1:8888/?code=4/0AX4XfWiLeoP0OglH3-VeEIokX7Bm12L895CkWPlKqF3PkvqlhBtrjs7Aikxj_JeDk-xexQ&scope=https://mail.google.com/

The code is this part:
4/0AX4XfWiLeoP0OglH3-VeEIokX7Bm12L895CkWPlKqF3PkvqlhBtrjs7Aikxj_JeDk-xexQ

This is actually the way Microsoft Outlook and Exchange authorization
works already.

Longer term this can be improved to make it more automated and remove
this copy/paste stage, but in the immediate term this fixes the
deprecation issue with Gmail.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Auth_screen.png
Type: image/png
Size: 75278 bytes
Desc: not available
URL: <http://lists.claws-mail.org/pipermail/users/attachments/20220413/4e9ea185/attachment-0001.png>


More information about the Users mailing list