MStadlmeier / drivesync

Google Drive synchronization for Linux
MIT License
197 stars 26 forks source link

Google OAuth Error 400: Invalid request #54

Open mich-j opened 1 year ago

mich-j commented 1 year ago

Hello,

authorization URL printed in the terminal leads to an error 400: invalid request, which is shown by a Google OAuth login site:

The out-of-band (OOB) flow has been blocked in order to keep users secure. Follow the Out-of-Band (OOB) flow migration guide linked in the developer docs below to migrate your app to an alternative method.
Request details: redirect_uri=urn:ietf:wg:oauth:2.0:oob 

As far as I can read here and here, authentication method used by drivesync is deprecated now.

suyashjain commented 1 year ago

Yes, I am also having same issue.

Kiu1812 commented 12 months ago

Same, it does not seem to be a particular case, as @mich-j said it seems like the method is deprectated and he posted the links with the info from Google.

muunkky commented 11 months ago

Any updates? Is there another method?

ScorpionResponse commented 10 months ago

FWIW I was able to get this to work by editing drive_manager.rb and changing this line:

OOB_URI = 'urn:ietf:wg:oauth:2.0:oob'

to this:

OOB_URI = 'http://localhost'

Then you can run the process for the first time (I am using a derived docker image, so my commands I think are not actually relevant to this particular package) it will generate a google link with a redirect_uri of localhost. So you open that, auth it, it will redirect to localhost (which I assume is nothing, so your browser should just stop there) and then you can copy out the code param from the URL and paste it in to complete the auth process.