gdrive icon indicating copy to clipboard operation
gdrive copied to clipboard

fix(auth/oauth): change redirect url

Open BugCode1 opened this issue 2 years ago • 6 comments

it's the only way i find and work for now

BugCode1 avatar Dec 19 '22 07:12 BugCode1

Just curious, how is it supposed to work if redirect url is localhost:1? Does gdrive open a port? is it tcp port :1 ?

anttiryt avatar Dec 19 '22 13:12 anttiryt

Just curious, how is it supposed to work if redirect url is localhost:1? Does gdrive open a port? is it tcp port :1 ?

no, it's not open a port, because of deprecate OOB it can't use google url so i use localhost address and u can see the callback request data on url, then just copy the verification code from that

BugCode1 avatar Dec 19 '22 17:12 BugCode1

Interesting, but didn't seem to work for me either.

https://accounts.google.com/o/oauth2/auth?access_type=offline&client_id=36x-7n0vf5akeru7on6o2fjinrecpdoe99eg.apps.googleusercontent.com&redirect_uri=http%3A%2F%2Flocalhost%3A1%2FASDF&response_type=code&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fdrive&state=state

->

http://localhost:1/ASDF?state=state&code=4/0AWgavdfEU9Qp-KO9K2xhFOa7u8_KFRnn9NSLDetUHExzcM4H42giWagN2EB4oIyEXuPZcw&scope=https://www.googleapis.com/auth/drive

->

4/0AWgavdfEU9Qp-KO9K2xhFOa7u8_KFRnn9NSLDetUHExzcM4H42giWagN2EB4oIyEXuPZcw

->

Failed getting oauth client: Failed to exchange auth code for token: oauth2: cannot fetch token: 400 Bad Request Response: { "error": "redirect_uri_mismatch", "error_description": "Bad Request" }

Mine was in GCE. Maybe it has an IP REMOTE_ADDR checkup.

anttiryt avatar Dec 20 '22 06:12 anttiryt

hi...

using version 2.1.2 now after allow button it return to

The webpage at http://localhost:1/?state=state&code=4/0AWgavde6eXXXXXXXpalmhLdZweXXXXXpvVGjS2rL-SXXXXbc9QzqJLBPA&scope=https://www.googleapis.com/auth/drive might be temporarily down or it may have moved permanently to a new web address

any solution?

thank you

fachos avatar Jan 07 '23 10:01 fachos

ok sorry.. i understand now.....

4/0AWgavde6eXXXXXXXpalmhLdZweXXXXXpvVGjS2rL-SXXXXbc9QzqJLBPA

this is the activation code.....

thank you so much

fachos avatar Jan 07 '23 10:01 fachos

It's worked for me. Thank you very much!

jianshu-qin avatar Mar 29 '23 08:03 jianshu-qin