From 65e6444e574ad037df6b3a8160b809341fa141a6 Mon Sep 17 00:00:00 2001 From: Avris Date: Sun, 5 Dec 2021 23:05:51 +0100 Subject: [PATCH] [oauth] fix development redirecting to live --- server/routes/user.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/routes/user.js b/server/routes/user.js index 43728b30..f9317522 100644 --- a/server/routes/user.js +++ b/server/routes/user.js @@ -431,7 +431,7 @@ router.get('/user/social/:provider', handleErrorAsync(async (req, res) => { if (!req.session.socialRedirect) { return '/' + config.user.route; } - const host = buildLocaleList(config.locale, true)[req.session.socialRedirect].url; + const host = process.env.NODE_ENV === 'development' ? '' : buildLocaleList(config.locale, true)[req.session.socialRedirect].url; delete req.session.socialRedirect; return `${host}/api/user/social-redirect-callback/${encodeURIComponent(token)}`;