[oauth] fix development redirecting to live

This commit is contained in:
Avris 2021-12-05 23:05:51 +01:00
parent a50750e829
commit 65e6444e57
1 changed files with 1 additions and 1 deletions

View File

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