-
Notifications
You must be signed in to change notification settings - Fork 80
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
Added default auth & token URLs instead from the wellknownfile #46
Conversation
spothala
commented
Aug 16, 2018
- 2LO flow is not working with ~/.config/gcloud/application_default_credentials.json as it doenst contain fields token_uri & auth_uri
- So pointing them to default URLs
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here (e.g. What to do if you already signed the CLAIndividual signers
Corporate signers
|
1 similar comment
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here (e.g. What to do if you already signed the CLAIndividual signers
Corporate signers
|
CLAs look good, thanks! |
1 similar comment
CLAs look good, thanks! |
@@ -90,8 +93,8 @@ func (f *File) TokenSource(ctx context.Context, scopes []string, | |||
ClientSecret: f.ClientSecret, | |||
Scopes: scopes, | |||
Endpoint: internal.Endpoint{ | |||
AuthURL: f.AuthURL, | |||
TokenURL: f.TokenURL, |
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.
We should not use hardcoded urls here. How about using the default urls as fallback when the file url is empty?
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.
Thats totally makes sense. I assumed ADC file wont have any auth & token urls. Let me update the change accordingly.
@@ -23,6 +23,9 @@ import ( | |||
// DefaultTokenURL is Google's OAuth 2.0 token URL to use with the JWT flow. | |||
const DefaultTokenURL = "https://accounts.google.com/o/oauth2/token" |
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.
The default URL has changed. The new one is oauth2.googleapis.com/token. Please fix it.
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.
#50 ready for review