jaredhanson / passport-instagram

Instagram authentication strategy for Passport and Node.js.
https://www.passportjs.org/packages/passport-instagram/?utm_source=github&utm_medium=referral&utm_campaign=passport-instagram&utm_content=about
MIT License
171 stars 86 forks source link

Matching code was not found or was already used #9

Open olalonde opened 7 years ago

olalonde commented 7 years ago

I started getting this error in my logs yesterday out of nowhere (app hasn't been suspended or anything and code hasn't changed):

error: { InternalOAuthError: Failed to obtain access token
    at Strategy.OAuth2Strategy._createOAuthError (/app/node_modules/passport-oauth2/lib/strategy.js:370:17)
    at /app/node_modules/passport-oauth2/lib/strategy.js:166:45
    at /app/node_modules/oauth/lib/oauth2.js:177:18
    at passBackControl (/app/node_modules/oauth/lib/oauth2.js:123:9)
    at IncomingMessage.<anonymous> (/app/node_modules/oauth/lib/oauth2.js:143:7)
    at emitNone (events.js:91:20)
    at IncomingMessage.emit (events.js:185:7)
    at endReadableNT (_stream_readable.js:974:12)
    at _combinedTickCallback (internal/process/next_tick.js:74:11)
    at process._tickCallback (internal/process/next_tick.js:98:9)
  name: 'InternalOAuthError',
  message: 'Failed to obtain access token',
  oauthError:
   { statusCode: 400,
     data: '{"code": 400, "error_type": "OAuthException", "error_message": "Matching code was not found or was already used."}' } }
172.20.0.131 - - [19/Dec/2016:07:32:38 +0000] "GET /v1/auth/connect/instagram/callback?code=fb86fa830c7b4c2eaac03d88bd03ed5e HTTP/1.1" 500 39 "https://blockai.com/account/social" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.95 Safari/537.36" user_id=20 user_username=olalonde

Was wondering if anyone else had a similar issue and fixed it.

elsbree commented 7 years ago

I just integrated passport-instagram today, and I haven't been able to get it to work because of this error. It's totally possible that I configured it incorrectly, but I just thought I'd chime in since I'm seeing the same issue.

Edit: I can authenticate with my personal Instagram account, but not as the Instagram account that owns the app. So I'm guessing that my issue is unrelated to the original one posted.

5nyper commented 7 years ago

check this: https://news.ycombinator.com/item?id=13178789

Seems to be an issue affecting others cause of Instagram :/

sanket6446 commented 5 years ago

I am still getting this error. how can i solve this ?

image

AmrutBiz4 commented 4 years ago

Please check this simple answer if you are following the same.