dheerajrajjak / google-api-python-client

Automatically exported from code.google.com/p/google-api-python-client
0 stars 0 forks source link

Do not echo back verification code to stdout #145

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
When authenticating, the user's verification code is printed back to stdout, 
e.g.,

----------------------
Go to the following link in your browser:
https://accounts.google.com/o/oauth2/auth...

Enter verification code: <visible on command line!>
----------------------

Perhaps use Python's getpass module to hide the verification code?

http://docs.python.org/library/getpass.html

Original issue reported on code.google.com by aryann@google.com on 12 Jun 2012 at 10:03

GoogleCodeExporter commented 8 years ago
The verification code is not only visible on the command-line it is also 
visible on the web page that you copied it from, and even more than that, can 
be visible in the title bar of the browser, as described on this page:

  https://developers.google.com/accounts/docs/OAuth2InstalledApp

That's because the code is short lived, one time only, and completely useless 
without the client_id and client_secret.

Original comment by jcgregorio@google.com on 13 Jun 2012 at 1:15

GoogleCodeExporter commented 8 years ago
FWIW I completely agree with Joe. Additionally it is really useful to be able 
to see it for some occasional user who has to type it in.

Original comment by afs...@google.com on 13 Jun 2012 at 3:00