{"action":"opened","issue":{"url":"https://api.github.com/repos/jaredhanson/passport-google-oauth2/issues/15","repository_url":"https://api.github.com/repos/jaredhanson/passport-google-oauth2","labels_url":"https://api.github.com/repos/jaredhanson/passport-google-oauth2/issues/15/labels{/name}","comments_url":"https://api.github.com/repos/jaredhanson/passport-google-oauth2/issues/15/comments","events_url":"https://api.github.com/repos/jaredhanson/passport-google-oauth2/issues/15/events","html_url":"https://github.com/jaredhanson/passport-google-oauth2/issues/15","id":178759646,"number":15,"title":"TokenError: Code was already redeemed and TokenError: Bad Request","user":{"login":"carbonizon","id":6063687,"avatar_url":"https://avatars.githubusercontent.com/u/6063687?v=3","gravatar_id":"","url":"https://api.github.com/users/carbonizon","html_url":"https://github.com/carbonizon","followers_url":"https://api.github.com/users/carbonizon/followers","following_url":"https://api.github.com/users/carbonizon/following{/other_user}","gists_url":"https://api.github.com/users/carbonizon/gists{/gist_id}","starred_url":"https://api.github.com/users/carbonizon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carbonizon/subscriptions","organizations_url":"https://api.github.com/users/carbonizon/orgs","repos_url":"https://api.github.com/users/carbonizon/repos","events_url":"https://api.github.com/users/carbonizon/events{/privacy}","received_events_url":"https://api.github.com/users/carbonizon/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-23T01:10:04Z","updated_at":"2016-09-23T01:10:04Z","closed_at":null,"body":"I have a pretty basic passport setup as you can see below. Every once in a while I get two different errors. `TokenError: Code was already redeemed` and `TokenError: Bad Request` for reasons I cannot seem to find.\r\n\r\nI've looked around a lot (1 week) for possible solutions but am yet to find one which works.\r\n\r\nDo you see anything wrong with the current code?\r\n\r\n\tapp.get('/auth/google', redirect, passport.authenticate('google', { scope: ['profile', 'email'] }));\r\n\r\n\tapp.get('/auth/google/callback', passport.authenticate('google', { failureRedirect: '/' }),\r\n\t  function(req, res) {\r\n\t    res.redirect('/');\r\n\t  }\r\n\t);\r\n**Here are the two errors:**\r\n\r\n    TokenError: Bad Request \r\n      at Strategy.OAuth2Strategy.parseErrorResponse (/app/node_modules/passport-oauth2/lib/strategy.js:320:12) \r\n      at Strategy.OAuth2Strategy._createOAuthError (/app/node_modules/passport-oauth2/lib/strategy.js:367:16) \r\n      at /app/node_modules/passport-oauth2/lib/strategy.js:166:45 \r\n      at /app/node_modules/oauth/lib/oauth2.js:177:18 \r\n      at passBackControl (/app/node_modules/oauth/lib/oauth2.js:123:9) \r\n      at IncomingMessage.<anonymous> (/app/node_modules/oauth/lib/oauth2.js:143:7) \r\n      at emitNone (events.js:85:20) \r\n      at IncomingMessage.emit (events.js:179:7) \r\n      at endReadableNT (_stream_readable.js:913:12) \r\n      at _combinedTickCallback (internal/process/next_tick.js:74:11) \r\n      at process._tickCallback (internal/process/next_tick.js:98:9)\r\n      \r\n\r\n\r\n    TokenError: Code was already redeemed. \r\n          at Strategy.OAuth2Strategy.parseErrorResponse (/app/node_modules/passport-oauth2/lib/strategy.js:320:12) \r\n          at Strategy.OAuth2Strategy._createOAuthError (/app/node_modules/passport-oauth2/lib/strategy.js:367:16) \r\n          at /app/node_modules/passport-oauth2/lib/strategy.js:166:45 \r\n          at /app/node_modules/oauth/lib/oauth2.js:177:18 \r\n          at passBackControl (/app/node_modules/oauth/lib/oauth2.js:123:9) \r\n          at IncomingMessage.<anonymous> (/app/node_modules/oauth/lib/oauth2.js:143:7) \r\n          at emitNone (events.js:85:20) \r\n          at IncomingMessage.emit (events.js:179:7) \r\n          at endReadableNT (_stream_readable.js:913:12) \r\n          at _combinedTickCallback (internal/process/next_tick.js:74:11) \r\n          at process._tickCallback (internal/process/next_tick.js:98:9) "}}
{"actor":{"display_login":"carbonizon"}}