badu / goauth2

Automatically exported from code.google.com/p/goauth2
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

oauth with instagram broken #39

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

try oauth with instagram api, after user accepts instagram app,
exchange user provided code for instagram access_token with Transport.Exchange()

What is the expected output? What do you see instead?

Expected: getting the access token from instagram
Getting Error: 
code: 400,
error_type: "OAuthException",
error_message: "You must provide a client_secret"

What version of the product are you using? On what operating system?

current version, fresh go get code.google.com/p/goauth2/oauth

Please provide any additional information below.

An issue was fixed 6 days ago, putting the client_id for calls to google as 
form parameter. This works for instagram too!

Fix for google: https://codereview.appspot.com/129150043

I tried adding Instagram as exception in oauth.go -> providerAuthHeaderWorks():

    if strings.HasPrefix(tokenURL, "https://api.instagram.com/oauth") {
        return false
    }

which works.

Original issue reported on code.google.com by david.kn...@freiheit.com on 20 Aug 2014 at 10:08

GoogleCodeExporter commented 9 years ago
This issue was closed by revision afe77d958c70.

Original comment by a...@golang.org on 28 Aug 2014 at 5:28