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

[AUTH] Sign in with Google temporarily disabled for this app #546

Open
ricardosllm opened this issue Apr 29, 2020 · 15 comments
Open

[AUTH] Sign in with Google temporarily disabled for this app #546

ricardosllm opened this issue Apr 29, 2020 · 15 comments

Comments

@ricardosllm
Copy link

After installing gdrive through homebrew and trying to list documents with

❯ gdrive list                                                                                                                                                    14:50:18
Authentication needed
Go to the following url in your browser:
https://accounts.google.com/o/oauth2/auth?access_type=offline&client_id=masked-client-id&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&response_type=code&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fdrive&state=state

Enter verification code:

I get the following:

image

Url: https://accounts.google.com/signin/oauth/danger?authuser=0&part=xxxxxxxxx-masked-xxxxxxxxx

@AdamMarciniak
Copy link

Yep I get that too

@AdamMarciniak
Copy link

Ah follow the tutorial for the pinned issue:
#533

@juliusbaxter
Copy link

Any word on when this might be fixed without the workaround? I would like to use this with my corporate Gsuite account (and enable others to do so, too) and we won't have access to generate our own credentials the way it is suggested in the workaround.

Thanks.

@fluidum
Copy link

fluidum commented May 9, 2020

Open a project and generate yourself Desktop OAuth client ID credentials.

https://console.developers.google.com/?pli=1

clone the source

git clone https://github.com/gdrive-org/gdrive.git
cd gdrive/

change the two parameters you generated for yourself

const ClientId =
const ClientSecret =

vi handlers_drive.go

get dependencies

go get github.com/prasmussen/gdrive

build your custom gdrive

go build
chmod +x gdrive
mv gdrive /usr/local/bin/

go and activate your OAUTH. Probably getting red alert but in your own app you can continue

gdrive about

PS: another WAR is generating on the same page a service account and use the param all the time:

mkdir -p ~/.gdrive
mv atomic-segment-201915-x.json ~/.gdrive/
gdrive about --service-account atomic-segment-201915-x.json

@kayzhou
Copy link

kayzhou commented Jun 25, 2020

What application type should we choose when we create OAuth client ID?
#553
批注 2020-06-25 123820

@mbrother2
Copy link

@kayzhou

You can choose Desktop app. Read more: mbrother2/backuptogoogle#19

@woshidama323
Copy link

It works @noraisk thanks

@Urbaner3
Copy link

There is no 'go' on windows 10. Is there any alternative?

@LiberQuack
Copy link

@Urbaner3 you need to install it
it's a programming language like C++/Java/Javascript... so it doesn't come bundled with Windows

@linnabrown
Copy link

@noraisk Hi, I stuck with this

gdrive about --service-account  one.json
Failed getting oauth client: google: read JWT from JSON credentials: 'type' field is "" (expected "service_account")

I choose the Desktop option for OAuth client ID? But I still do not find the service_account key in json.

@linnabrown
Copy link

Error 403: access_denied

The developer hasn’t given you access to this app. It’s currently being tested and it hasn’t been verified by Google. If you think you should have access, contact the developer (my-gmail-address).
Learn more
Request Details
access_type=offline
response_type=code
redirect_uri=urn:ietf:wg:oauth:2.0:oob
state=state
client_id=517452042405-qsa19i9n581s5a8r2116c858ps8apgaq.apps.googleusercontent.com
scope=https://www.googleapis.com/auth/drive

@fluidum
Copy link

fluidum commented Dec 10, 2020

@linnabrown double click your OAuth 2.0 Client IDs record name. When new page opens there is a button download JSON. Feed that configfile into app. Also make sure that your OAuth token is created under Google Drive API.

@naivomah3
Copy link

Open a project and generate yourself Desktop OAuth client ID credentials.

https://console.developers.google.com/?pli=1

clone the source

git clone https://github.com/gdrive-org/gdrive.git
cd gdrive/

change the two parameters you generated for yourself

const ClientId =
const ClientSecret =

vi handlers_drive.go

get dependencies

go get github.com/prasmussen/gdrive

build your custom gdrive

go build
chmod +x gdrive
mv gdrive /usr/local/bin/

go and activate your OAUTH. Probably getting red alert but in your own app you can continue

gdrive about

PS: another WAR is generating on the same page a service account and use the param all the time:

mkdir -p ~/.gdrive
mv atomic-segment-201915-x.json ~/.gdrive/
gdrive about --service-account atomic-segment-201915-x.json

As of may 2021, this method is no longer working.

@ttt-t-ttt
Copy link

ttt-t-ttt commented Jul 5, 2021

@naivomah3 Here is a Woking one, I used the official golang Docker image for go 1.16

Open a project and generate yourself Desktop OAuth client ID credentials.

https://console.developers.google.com/?pli=1

clone the source

git clone https://github.com/gdrive-org/gdrive.git
cd gdrive/

change the two parameters you generated for yourself

const ClientId =
const ClientSecret =

vi handlers_drive.go

get dependencies

go get github.com/prasmussen/gdrive

Create mod file

echo "module gdrive" >> go.mod

finde dependencies on machine

go mod tidy

build your custom gdrive

go build

build your custom gdrive but with this command

go build -mod=readonly -ldflags '-w -s'

chmod +x gdrive
mv gdrive /usr/local/bin/

go and activate your OAUTH. Probably getting red alert but in your own app you can continue

gdrive about

PS: another WAR is generating on the same page a service account and use the param all the time:

mkdir -p ~/.gdrive
mv atomic-segment-201915-x.json ~/.gdrive/
gdrive about --service-account atomic-segment-201915-x.json

CREDIT: https://stackoverflow.com/a/52243548

@ttt-t-ttt
Copy link

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