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

App Engine Fix: Supply a context to oauth2 Export() #40

Closed
oyvindsk opened this issue Oct 9, 2015 · 3 comments
Closed

App Engine Fix: Supply a context to oauth2 Export() #40

oyvindsk opened this issue Oct 9, 2015 · 3 comments
Assignees
Labels
frozen due to age Issues that have been left open but haven't received comments in more than six months will be closed Improvement

Comments

@oyvindsk
Copy link

oyvindsk commented Oct 9, 2015

This is what I have so far. It works, but as a Golang and App Engine noob, I'm guessing some else can come up with a nicer solution? oyvindsk@6e8230b
It's a pain to implement that callback as you an see in the comment.

Why:
The oauth2 module changed and it now handles the http.DefaultClient stuff in App Engine compatible way. So for oauth2 you no longer have to set http.DefaultClient and http.DefaultTransport as in Issue #27 . (goth using the default http.Client is another issue..)

But, you do have to supply a context.Context to oauth2 in Exchange() as in the above commit.

Related:
Pull #30
https://groups.google.com/forum/#!searchin/google-appengine-go/oauth2/google-appengine-go/5H2Ra85cu1M/e57iIRivEgAJ

@felixLam
Copy link
Contributor

I have submitted a PR that fixes the use of the DefaultClient (it makes it at least configurable).
#87

@bentranter
Copy link
Collaborator

This should be fixed as of #87, but I'm going to try this on AppEngine myself and see if I can either document how it'd work on AppEngine, or add it to a separate example in the examples folder.

@bentranter bentranter self-assigned this Feb 15, 2018
@bentranter
Copy link
Collaborator

Closing this due to age, feel free to re-open if it's still an issue.

@bentranter bentranter added the frozen due to age Issues that have been left open but haven't received comments in more than six months will be closed label Oct 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
frozen due to age Issues that have been left open but haven't received comments in more than six months will be closed Improvement
Projects
None yet
Development

No branches or pull requests

4 participants