-
Notifications
You must be signed in to change notification settings - Fork 257
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Command line example in documentation does not work anymore #374
Comments
I sure could use an example of how this is supposed to work now, whether it's in the documentation or not. |
@bajajneha27 - Can you look into this? |
I did get something working (in a dependent gem) using duct tape and bailing wire: gimite/google-drive-ruby#424 (comment) This is likely not the solution Google had in mind when they made this change (copy/paste a chunk of a URL from an error message). |
@cwant I did post a more "proper" solution on the StackOverflow question you are referring to in your link. https://stackoverflow.com/a/71491500/1213346 It is more in line with what was envisioned, i.e., the app received the code automatically from the redirected of the browser. |
Thanks a lot @cwant, I did the same as what you suggested and it worked for me. Thanks @chutzimir for sharing your more proper solution too. It would still be great if a Googler could provide reference code that works following OOB flow deprecation. Thanks in advance! |
Thank you all for reporting this and for your patience. |
Closing this with #435 is disappointing. The people commenting in this thread would like sample code to authenticate a command line application. This is also why I enabled notifications for this issue. Is that no longer possible.. easily? (I am currently doing so with puppeteer, a huge dependency for a command line program, and a brittle auth mechanism.) If not, it would be helpful to state clearly, instead of the simple reference to the Google documentation -- which is not particularly straight forward. |
@richardkmichael Apologies for the inconvenience caused. But the command line mechanism is deprecated. If the migration guide looks complicated, I'd suggest you to look at this web sample here or here ( this will be shortly updated ). Hope this helps. |
I agree with Richard, this is a definite lose for users of the APIs. There are use cases for these APIs (automation, data mining) that don't involve browsers and phones. |
Hi folks — I understand your concerns. However, this is outside of our control (for this library) as it's impacting all auth libraries. There's more detail here: https://developers.google.com/identity/protocols/oauth2/resources/oob-migration in addition to what @bajajneha27 already shared. Specifically: "This effort is a protective measure against phishing and app impersonation attacks during interactions with Google's OAuth 2.0 authorization endpoints." |
With the recent enforcement of non-copy-paste authorization flows the "Command line" examples in this library's README.md are no longer working.
I already posted this at StackOverflow but the gist of it is what Command Line applications now fail to authorize with the following error:
Basically the code which uses
urn:ietf:wg:oauth:2.0:oob
will fail.Steps to reproduce
Code example
The text was updated successfully, but these errors were encountered: