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

fix(auth/oauth): change redirect url #665

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

BugCode1
Copy link

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

@anttiryt
Copy link

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

@BugCode1
Copy link
Author

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 BugCode1 mentioned this pull request Dec 19, 2022
@anttiryt
Copy link

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.

@fachos
Copy link

fachos commented Jan 7, 2023

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
Copy link

fachos commented Jan 7, 2023

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

4/0AWgavde6eXXXXXXXpalmhLdZweXXXXXpvVGjS2rL-SXXXXbc9QzqJLBPA

this is the activation code.....

thank you so much

@jianshu-qin
Copy link

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

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

Successfully merging this pull request may close these issues.

4 participants