google / gmail-oauth2-tools

Tools and sample code for authenticating to Gmail with OAuth2
Apache License 2.0
412 stars 211 forks source link

Unclear how to register an application, establish a client-id #53

Open timcoote opened 2 years ago

timcoote commented 2 years ago

The wiki includes the comment (on https://github.com/google/gmail-oauth2-tools/wiki/OAuth2DotPyRunThrough): "To use OAuth2, you must have registered your application through the Google APIs Console. Registration is explained in Using OAuth 2.0 to Access Google APIs."

Unfortuntately, neither of the links actually explains what needs to be registered where nor (presumably) how to obtain the 'client-id' token used in the examples on the page.

There is lots of stuff about setting up GCP accounts/projects, but nothing about getting a client-id. Additionally there is lots of documentation on how to use third party apps with the IMAP interface, but nothing (that I can find) on how authentication is now meant to work with IMAP on gmail for a simple program.

Isn't the withdrawal of an authentication mechanism quite a serious security event as it severely hits the availability (as in the mnemonic of Confidentiality, Integrity, Availability for Security) of the service?

junyer commented 1 year ago

https://github.com/google/gmail-oauth2-tools/blob/aa0cdb99db9f8e54d3906168962af06f70fb5671/python/oauth2.py#L19-L27

Is https://developers.google.com/identity/protocols/OAuth2 more helpful? The wiki page hasn't been updated for six years. :(