remy/jsbin — pull request #861 by aron (2013-09-18 18:03:43+00:00)
Title: Handle errors raised by passport-github

Despite being a 401 they currently bubble up to the top level error handler, here we redirect the user back to the app with a friendly flash message. As the commit message says these are likely caused by users hitting the back button or refreshing the browser after auth causing the app to try and process an expired token.

Example url for testing before/after: http://jsbin.com/auth/github/callback?code=expired