google / skicka

Command-line utility for working with Google Drive. Join the mailing list at https://groups.google.com/forum/#!forum/skicka-users.
Apache License 2.0
1.3k stars 118 forks source link

This app is blocked #141

Open TonalidadeHidrica opened 3 years ago

TonalidadeHidrica commented 3 years ago

When I tried to authorize via browser (run skicka init and then skicka ls without setting any value), I got the following error after clicking my e-mail address:

This app is blocked This app tried to access sensitive info in your Google Account. To keep your account safe, Google blocked this access.

Why did it happen and how can I workaround?

max-mapper commented 3 years ago

I got the same error

iquasere commented 3 years ago

Can this be looked upon? It breaks functionality of the tool

mmp commented 3 years ago

A workaround, unless/until someone fixes this on the google side, is to create your own OAuth client id, as described here. Then, edit this line in skicka.go:

const clientId = "952282617835-siotrfjbktpinek08hrnspl33d9gho1e.apps.googleusercontent.com"

and replace it with the one you generated.

iquasere commented 3 years ago

This is the right fix

gedw99 commented 3 years ago

thanks @mmp :)

Beafantles commented 3 years ago

Same error aswell

psifertex commented 3 years ago

I get:

skicka: attempting to launch browser to authorize.
(Re-run skicka with the -no-browser-auth option to authorize directly.)
skicka: error with OAuth2 Authorization: oauth2: cannot fetch token: 400 Bad Request
Response: {
  "error": "invalid_request",
  "error_description": "client_secret is missing."
} 

when attempting to use the workaround of creating a manual oath2 id.

[EDIT]

Ahh, found the issue -- you have to edit your ~/.skicka.config file to add your secret. Here's the workflow that worked for me (note you don't have to edit the source either this way):

  1. Create an oath2 "desktop" credential from the GCP page
  2. Uncomment the clientid line (by removing the ;) from ~/.skicka.config and set the value to the clientid from the above page
  3. Uncomment the clientsecret line (by removing the ;) from ~/.skicka.config and set the value to the secret from the above page