Skip to content
This repository has been archived by the owner on Apr 19, 2023. It is now read-only.

Sign in with Google temporarily disabled for this app #506

Open
chickenstealers opened this issue Nov 5, 2019 · 141 comments
Open

Sign in with Google temporarily disabled for this app #506

chickenstealers opened this issue Nov 5, 2019 · 141 comments

Comments

@chickenstealers
Copy link

When i try to get Verification Code with gdrive about
and pasting url to the browser and than login, i've got the following error ;

Sign in with Google temporarily disabled for this app
This app has not been verified yet by Google in order to use Google Sign In.

@koji117
Copy link

koji117 commented Nov 6, 2019

I got the same error here.

@AndoOfTheWoods
Copy link

ditto

@pgbrown
Copy link

pgbrown commented Nov 6, 2019

me too

@pratikkayal
Copy link

I got this error too

@albertoaldrigo
Copy link

me too

@mgilank
Copy link

mgilank commented Nov 6, 2019

got this too

@realjax
Copy link

realjax commented Nov 6, 2019

If you happen to have authenticated earlier with another user you can solve this problem by copying that users /.gdrive folder to the users home folder for which authentication now fails.

@BartDotRun
Copy link

Problem still exists at this moment

@milan8
Copy link

milan8 commented Nov 7, 2019

I got the same error too. Google disabled this app now.

@ardunn
Copy link

ardunn commented Nov 7, 2019

same

@KyleDulay
Copy link

Nothing you can do about this. The owner of the app will need to submit the app for review so that google can re-enable it. Google is beginning to review apps that use OAUTH permissions for security reasons.

@ruizyi
Copy link

ruizyi commented Nov 9, 2019

Same here :(

@git-hamza
Copy link

I am having the same problem. Have somebody solve it yet. I am trying to link my gdrive account to VM instance on GCP but it is giving this problem.

@BartDotRun
Copy link

Nothing you can do about this. The owner of the app will need to submit the app for review so that google can re-enable it. Google is beginning to review apps that use OAUTH permissions for security reasons.

Is the gdrive V2 still working? Since that one uses the the authentication process.

@theBreadCompany
Copy link

I confirm login issues.

@wagesj45
Copy link

wagesj45 commented Nov 9, 2019

You need to build the application from source using your own app key. You can find more information and the instructions on how to do that in this issue.

@KyleDulay
Copy link

Nothing you can do about this. The owner of the app will need to submit the app for review so that google can re-enable it. Google is beginning to review apps that use OAUTH permissions for security reasons.

Is the gdrive V2 still working? Since that one uses the the authentication process.

I cannot confirm as I have not had time to look into it, but @wagesj45 answer is a good one if you really need this to work, it's just a little extra work.

Regardless if you build the application from source using your own app key or not, if it requires Oauth permissions it will need to undergo app review by Google, so just keep that in mind.

@chickenstealers
Copy link
Author

For all of you that sill have working token_v2.json make a backup of it
i can use token_v2.json on many different server

@mgilank
Copy link

mgilank commented Nov 10, 2019

For all of you that sill have working token_v2.json make a backup of it
i can use token_v2.json on many different server

this workaround works.

@theBreadCompany
Copy link

theBreadCompany commented Nov 10, 2019

In case use the tutorial given by the issue @wagesj45 links to, please note that the token has an one hour expiry. I would be happy if there's a way to change this. I had to use this because I tried to relink gdrive to my google account, which (of course) failed, so I couldn't use my token anymore.

@hhitch
Copy link

hhitch commented Nov 10, 2019

unfortunately I have to say "me too" when using gdrive.

Sign in with Google temporarily disabled for this app
This app has not been verified yet by Google in order to use Google Sign In.

@theBreadCompany
Copy link

theBreadCompany commented Nov 10, 2019

Does somebody know if prasmussen is already developing again or should we contact him? Sorry, I don’t know what to do in these situations...

@shibababa
Copy link

me too.
this is Japanese error message.

このアプリでは「Google でログイン」機能が一時的に無効
このアプリは Google での確認がまだ完了していないため Google ログインを使用できません。

@aisingio
Copy link

When i try to get Verification Code with gdrive about
and pasting url to the browser and than login, i've got the following error ;

Sign in with Google temporarily disabled for this app
This app has not been verified yet by Google in order to use Google Sign In.

temporary solution: build your own application with your own client_id and client_secret,see #392
click advance and allow your application to access your drive data when auth your application in your browser

@theBreadCompany
Copy link

@aisingio please check my comment above. At least my token expires after an hour.

@aisingio
Copy link

@FbMbg it has been 2 hours since i auth my app and it seems everything works fine fow now

@mikedesu
Copy link

If you happen to have authenticated earlier with another user you can solve this problem by copying that users /.gdrive folder to the users home folder for which authentication now fails.

Dude you are a fucking hero, word the fuck up!

@mikedesu
Copy link

mikedesu commented Nov 11, 2019 via email

@theBreadCompany
Copy link

@aisingio did you just replace the clientID and the clientSecret in handlers_drive.go?

@aisingio
Copy link

@FbMbg Yeah! works perfectly fine in the past 12 hours

@eskrei01
Copy link

Guys it 's very simple.
If your ClientID is longer than 72 characters, sed and hexedit will NOT work.
There's NO workaround for this. You basically overwrite program code this way.
ClientID less than 72 might work, you have to insert filler nop bytes (not tested).
Only if your ID is exactly 72 chars long it will reliably work.

Only possiblity if ID>72 is to compile from source, it's not that difficult acutally.

So what you are saying is that i can just add filler bytes to the client id?

Mine is 71 char long, if i add a number to the beginning it should work? to me that sounds strange as the client ID from google no longer matches... Perhaps it is possible to edit the ID directly in the developer console?

@mdobydullah
Copy link

Hello Everyone,

I've written a way to fix the issue. Please check this article: Mount Google Drive using GDrive on Linux Server with Own OAuth Credentials.

I hope this method will work on all servers.

Thanks.

@thearabbit
Copy link

thearabbit commented Jan 23, 2020

Hi @mdobydullah, the first very thanks for your guaid 🥇

  • I got error with go build (mac)
handlers_drive.go:12:2: cannot find package "github.com/prasmussen/gdrive/auth" in any of:
	/usr/local/Cellar/go/1.13.6/libexec/src/github.com/prasmussen/gdrive/auth (from $GOROOT)
	/Users/theara/go/src/github.com/prasmussen/gdrive/auth (from $GOPATH)
gdrive.go:7:2: cannot find package "github.com/prasmussen/gdrive/cli" in any of:
	/usr/local/Cellar/go/1.13.6/libexec/src/github.com/prasmussen/gdrive/cli (from $GOROOT)
	/Users/theara/go/src/github.com/prasmussen/gdrive/cli (from $GOPATH)
compare.go:5:2: cannot find package "github.com/prasmussen/gdrive/drive" in any of:
	/usr/local/Cellar/go/1.13.6/libexec/src/github.com/prasmussen/gdrive/drive (from $GOROOT)
	/Users/theara/go/src/github.com/prasmussen/gdrive/drive (from $GOPATH)
  • My handlers_drive.go
package main

import (
	"fmt"
	"io"
	"io/ioutil"
	"net/http"
	"os"
	"path/filepath"
	"time"

	"github.com/prasmussen/gdrive/auth"
	"github.com/prasmussen/gdrive/cli"
	"github.com/prasmussen/gdrive/drive"
)

const ClientId = "739992122513-**************apps.googleusercontent.com"
const ClientSecret = "7i9ncRrM**************dm"
const TokenFilename = "token_v2.json"
const DefaultCacheFileName = "file_cache.json"
.......
  • I install go via brew install go
$ go version
// go version go1.13.6 darwin/amd64

@thearabbit
Copy link

I tried to fixe cannot find package "github.com/prasmussen/gdrive/auth" with:

go get github.com/prasmussen/gdrive
  • I could build (Work fine)
go build
``
- Upload `gdrive` to server `/usr/local/bin` (DigitalOcean-Ubuntu)
- Set file permission `sudo chmod 755 /filepath/gdrive` or `sudo chmod +x /filepath/gdrive`

But get error with testing `gdrive about/list`
```js
-bash: /usr/local/bin/gdrive: cannot execute binary file: Exec format error

Please help me

@thearabbit
Copy link

NOW I work fine with

export GOOS=linux
----
go build

👍

@mdobydullah
Copy link

Hi @thearabbit

Congrats and thanks for the macOS solution. I've updated my article and added macOS solution. You can check the article again: Mount Google Drive using GDrive on Linux Server with Own OAuth Credentials

@thearabbit
Copy link

@mdobydullah, could you note for fixe this cannot find package "github.com/prasmussen/gdrive/auth"

go get github.com/prasmussen/gdrive

@mdobydullah
Copy link

Hi @thearabbit, Done bro...!

@thearabbit
Copy link

Excuse me @mdobydullah, Could you help for my issue #522

@thearabbit
Copy link

thearabbit commented Jan 24, 2020

Hi @mdobydullah, I have problem on Google API Service (Expire 30days)

image

I have problem with gdrive usage???

@mdobydullah
Copy link

Hello @thearabbit,

I've answered on the issue #522.

Google API Service: I think you won't face any issue with GDrive. But it's better to verify your application.

@shiyotsuki
Copy link

初心者の方のために、この問題を解決するための動画を作りました。
もしよかったら、参考にしてみてください。

For beginners, I made a video explaining how to solve this problem.
It is explained in Japanese, but I hope you find it helpful.
https://youtu.be/y6PeIwCbtiQ

@Shintaro-run
Copy link

For Mac(UNIX) user,
LC_ALL=C sed -i "" "s/367116221053-7n0vf5akeru7on6o2fjinrecpdoe99eg.apps.googleusercontent.com/(Your client ID)" gdrive

@harryghgim
Copy link

I was able to get it working this way:

  1. Go to Google Developer
  2. enable Google Drive APIs if you haven't already
  3. Generate a new oauth client id/secret for a "native" app (other) and copy them
  4. cd to your src dir, git clone https://github.com/gdrive-org/gdrive
  5. open the file handlers_drive.go and replace the client id and secret key with your own
  6. go get
  7. go build
  8. mv gdrive /usr/local/bin
  9. gdrive about
  10. copy and paste url into browser and grant permission

should work after that if you generated your access id and secret key correctly

My best,
Hugh

Thanks. it works like charm! BTW, what does go get do at stage 6? I did that but it says go get: no install location for directory /Users/gwanghyeongim/Documents/py/pyRecipe/05_gdrive/gdrive outside GOPATH

@yarkm13
Copy link

yarkm13 commented Mar 7, 2020

No need to compile from source, just create service account in google console and use --service-account option

@JurajMa
Copy link

JurajMa commented Mar 24, 2020

Authentication still not posible. Service account doesn't have enough storage.

@yarkm13
Copy link

yarkm13 commented Mar 24, 2020

@JurajMa create directory in your main account and share it with service account email address. Now you need to point your service account to work with that directory.

@Shintaro-run
Copy link

For those who still struggle with using gdrive, you may want to use rclone instead.
https://rclone.org/docs/

@qasimmughal0
Copy link

Hi Guys
Can someone help me about Gdrive issue.
I'm getting following issue
Response: {
"error": "invalid_grant",
"error_description": "Token has been expired or revoked."

Thanks

@joshenders
Copy link

joshenders commented May 6, 2020

This solution worked fine for my needs:

I followed @mbrother2's very excellent guide https://github.com/mbrother2/backuptogoogle/wiki/Create-own-Google-credential-step-by-step On slight difference, between step 7 and step 8, Google has added a new screen. A GCP account is needed but a GSuite account isn't strictly necessary, still works when the "External" radio button is selected.

I used my personal OAuth tokens and replaced the original developer's in the binary:

sed -i "s|367116221053-7n0vf5akeru7on6o2fjinrecpdoe99eg.apps.googleusercontent.com|INSERT_DOMAIN_HERE|g" path/to/the/executable/gdrive
sed -i "s|1qsNodXNaWq1mQuBjUjmvhoO|INSERT_TOKEN_HERE|g" path/to/the/executable/gdrive

@abder
Copy link

abder commented May 13, 2020

This solution worked fine for my needs:

I followed @mbrother2's very excellent guide https://github.com/mbrother2/backuptogoogle/wiki/Create-own-Google-credential-step-by-step On slight difference, between step 7 and step 8, Google has added a new screen. A GCP account is needed but a GSuite account isn't strictly necessary, still works when the "External" radio button is selected.

I used my personal OAuth tokens and replaced the original developer's in the binary:

sed -i "s|367116221053-7n0vf5akeru7on6o2fjinrecpdoe99eg.apps.googleusercontent.com|INSERT_DOMAIN_HERE|g" path/to/the/executable/gdrive
sed -i "s|1qsNodXNaWq1mQuBjUjmvhoO|INSERT_TOKEN_HERE|g" path/to/the/executable/gdrive

Works! Thank you!

@douglasfelc
Copy link

This solution worked fine for my needs:

I followed @mbrother2's very excellent guide https://github.com/mbrother2/backuptogoogle/wiki/Create-own-Google-credential-step-by-step On slight difference, between step 7 and step 8, Google has added a new screen. A GCP account is needed but a GSuite account isn't strictly necessary, still works when the "External" radio button is selected.

I used my personal OAuth tokens and replaced the original developer's in the binary:

sed -i "s|367116221053-7n0vf5akeru7on6o2fjinrecpdoe99eg.apps.googleusercontent.com|INSERT_DOMAIN_HERE|g" path/to/the/executable/gdrive
sed -i "s|1qsNodXNaWq1mQuBjUjmvhoO|INSERT_TOKEN_HERE|g" path/to/the/executable/gdrive

lol Thanks!!!

@blaisegassend
Copy link

blaisegassend commented Jul 14, 2020

Going to https://developers.google.com/oauthplayground allows you to get an access token or refresh token. Under the Drive API v3 section, select one of the following APIs:

https://www.googleapis.com/auth/drive.readonly
https://www.googleapis.com/auth/drive
Then click Authorize APIs, and Exchange authorization code for token. This will give you a token suitable for use with --access-token. For some reason the refresh token doesn't seem to work with --refresh-token.

@truekonrads
Copy link

Going to https://developers.google.com/oauthplayground allows you to get an access token or refresh token. Under the Drive API v3 section, select one of the following APIs:

https://www.googleapis.com/auth/drive.readonly
https://www.googleapis.com/auth/drive
Then click Authorize APIs, and Exchange authorization code for token. This will give you a token suitable for use with --access-token. For some reason the refresh token doesn't seem to work with --refresh-token.

I can confirm this works!

@Amooti73
Copy link

Amooti73 commented Aug 9, 2020

Thanks to @blaisegassend
I just tried that method and was able to save the output in a new token_v2.json file in ~/.gdrive
gdrive list then worked right away.

@Amooti73
Copy link

Amooti73 commented Aug 10, 2020

Apologies for my post since it only works for an hour. I had to repeat the process today to get access.

@Hadrien-Cornier
Copy link

https://developers.google.com/oauthplayground

I can confirm that the solution of @truekonrads works

@imotabar
Copy link

Apologies for my post since it only works for an hour. I had to repeat the process today to get access.

Is there a way around the expiration issue? I created my personal OAuth tokens and replaced the original developer's in the binary. The gdrive works fine for an hour but the token expires after that.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests