diff --git a/src/routes/oauth2.js b/src/routes/oauth2.js index a3a5e76f1..200894090 100644 --- a/src/routes/oauth2.js +++ b/src/routes/oauth2.js @@ -171,6 +171,8 @@ function sendErrorPageOrRedirect(req, res, message) { } } +// use this instead of sendErrorPageOrRedirect(), in case we have a returnTo provided in the query, to avoid login loops +// This usually happens when the OAuth client ID is wrong function sendError(req, res, message) { assert.strictEqual(typeof req, 'object'); assert.strictEqual(typeof res, 'object');