-
Notifications
You must be signed in to change notification settings - Fork 5
Fix: redirect_uri_mismatch #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
I just noticed your pull request tonight. Thank you very much. I have also been making a large number of improvements but I have not completed any commits because of the large number of new features and bug fixes. Starting tomorrow, I will begin integrating your improvements with mine. I am very interested in your work on Visual Code with Cloud Shell. Thank you. John |
jhanley-com
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please incorporate these changes to your code.
diff --git a/auth.go b/auth.go
index 73e0ee6..84ce9cc 100644
--- a/auth.go
+++ b/auth.go
@@ -569,7 +569,7 @@ func get_tokens() (string, string, error) {
auth_code := string(out)
- return processAuthCode(secrets, auth_code)
- return processAuthCode(secrets, auth_code, false)
}
func get_sa_tokens() (string, string, error) {
@@ -647,16 +647,20 @@ func manualAuthentication(secrets ClientSecrets, url string) (string, string, er
auth_code := strings.Replace(text, "\n", "", -1)
- return processAuthCode(secrets, auth_code)
- return processAuthCode(secrets, auth_code, true)
}
-func processAuthCode(secrets ClientSecrets, auth_code string) (string, string, error) {
+func processAuthCode(secrets ClientSecrets, auth_code string, flag_oob bool) (string, string, error) {
//************************************************************
content := "client_id=" + secrets.Installed.ClientID
content += "&client_secret=" + secrets.Installed.ClientSecret
content += "&code=" + auth_code
content += "&grant_type=authorization_code"
- content += "&redirect_uri=urn:ietf:wg:oauth:2.0:oob"
-
if flag_oob == false {
-
content += "&redirect_uri=http://localhost:9000" -
} else {
-
content += "&redirect_uri=urn:ietf:wg:oauth:2.0:oob" -
}
//************************************************************endpoint := "https://www.googleapis.com/oauth2/v4/token"
jhanley-com
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I integrated these changes with my changes in commit bdff83f
No description provided.