0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-10 23:36:14 -05:00

Allowed newer tokens to refresh member session

no-issue

This is so that an email sent after a payment is made will refresh the
session.
This commit is contained in:
Fabien O'Carroll 2019-09-25 16:51:17 +07:00
parent a85328f0e5
commit d81e1bf1c3

View file

@ -178,9 +178,6 @@ module.exports = function setupSiteApp(options = {}) {
if (!req.url.includes('token=')) {
return next();
}
if (req.member) {
return next();
}
try {
const member = await membersService.ssr.exchangeTokenForSession(req, res);
Object.assign(req, {member});