Skip to content
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

Merged
merged 3 commits into from
Aug 30, 2018

Conversation

spothala
Copy link
Contributor

  • 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

@googlebot
Copy link

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. I signed it!) and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

1 similar comment
@googlebot
Copy link

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. I signed it!) and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

@googlebot
Copy link

CLAs look good, thanks!

1 similar comment
@googlebot
Copy link

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

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?

Copy link
Contributor Author

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.

@shinfan shinfan merged commit df8e0fc into google:master Aug 30, 2018
@@ -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"
Copy link
Contributor

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.

Copy link
Collaborator

@shinfan shinfan Aug 30, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#50 ready for review

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

Successfully merging this pull request may close these issues.

4 participants