goth icon indicating copy to clipboard operation
goth copied to clipboard

proposal: app engine support

Open jtolio opened this issue 8 years ago • 9 comments

App Engine unfortunately can't make outbound requests without using the appengine urlfetch library and a request-specific context.

I don't see a way around this other than to change the signature of the Provider and Session interfaces.

This really has a huge amount of downsides obviously, but before I go and fix stuff for providers besides Facebook, G+, and Twitter (Twitter support requires https://github.com/mrjones/oauth/pull/60 to get merged), I figured I'd open a pull request and discuss the tradeoffs.

Unfortunately I think we need to do something like this to support App Engine. Perhaps this is an opportunity to version goth using gopkg.in or something?

jtolio avatar Dec 29 '16 00:12 jtolio

Yeah, there's no way the builder passes. Let me know if I should spend time fixing all the other providers.

jtolio avatar Dec 29 '16 00:12 jtolio

Of course, the other option is to add methods to all the interfaces. This makes provider implementation harder, but maybe that's worth the backwards compatibility.

jtolio avatar Dec 29 '16 21:12 jtolio

Backwards compatibility is really important. A lot of people have Goth in production. I don't want to break that. I, honestly, don't really understand the issue, so it's hard for me to help with guidance on a good solution.

markbates avatar Dec 29 '16 21:12 markbates

Perhaps some kind of global Requester interface/object that defaults to what is in there now, but can be overridden by the user-programmer?

tylerstillwater avatar Dec 29 '16 21:12 tylerstillwater

@tylerb: that's included in the above patchset. the problem is that the overrideable global requester requires knowing request specific context information. on app engine, you can't make an outbound request without tying it to the request that kicked off your app engine code

jtolio avatar Dec 29 '16 21:12 jtolio

I'll refactor to not break backwards compat.

jtolio avatar Dec 29 '16 21:12 jtolio

Okay, new commit, still only touched Facebook, G+, and Twitter, but should be backwards compatible with downstream libraries.

jtolio avatar Dec 30 '16 00:12 jtolio

If there's a chance this approach might be accepted, I'll get to work fixing all the other providers.

jtolio avatar Dec 30 '16 00:12 jtolio

Is there a work around for getting goth to work with GAE or should we wait until this gets merged in?

asawilliams avatar Mar 04 '17 03:03 asawilliams