The only route that will match is
app.get('/oauth2callback', routes.oauth)
because /oauth2callback
is the resource path. The rest of the URL string you've described is a querystring.
You can access the query parameters on the the req
object that will be passed to routes.ouath
. Yours will be available at req.params.code
and will look like 4/SOMECODE.LOL-ISHERE