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)}`;