blawar / nut

GNU General Public License v3.0
1.12k stars 193 forks source link

[Bug] gdrive auth uses random port for redirect #477

Open ogg1e opened 1 year ago

ogg1e commented 1 year ago

Describe the bug setting up gdrive oauth requires you to add a redirect URL to client credentials in the google api and services web page. However, nut appears to use a random port each time, so you can't get it to work.

To Reproduce Steps to reproduce the behaviour:

  1. Pu the credentials.json in the root folder
  2. add http://localhost to the trusted redirect URI in google api and services.
  3. run nut
  4. click on 'Setup Gdrive Auth'
  5. get google error page

Actual behaviour Google error: Error 400: redirect_uri_mismatch

You can't sign in to this app because it doesn't comply with Google's OAuth 2.0 policy.

If you're the app developer, register the redirect URI in the Google Cloud Console. Request details: redirect_uri=http://localhost:57795/