mirror of
https://gitlab.com/PronounsPage/PronounsPage.git
synced 2025-09-27 06:52:35 -04:00
(env) do not redirect to production when using social login
This commit is contained in:
parent
5326c4ade5
commit
9b233bc216
@ -662,7 +662,9 @@ router.get('/user/social/:provider', handleErrorAsync(async (req, res) => {
|
||||
if (!req.session.socialRedirect) {
|
||||
return `/${config.user.route}`;
|
||||
}
|
||||
const host = process.env.NODE_ENV === 'development' ? '' : buildLocaleList(config.locale, true)[req.session.socialRedirect].url;
|
||||
const host = process.env.NODE_ENV === 'development' || process.env.ENV === 'test'
|
||||
? ''
|
||||
: buildLocaleList(config.locale, true)[req.session.socialRedirect].url;
|
||||
delete req.session.socialRedirect;
|
||||
|
||||
return `${host}/api/user/social-redirect-callback/${encodeURIComponent(token)}`;
|
||||
|
Loading…
x
Reference in New Issue
Block a user