diff --git a/core/server/public/members.js b/core/server/public/members.js index 484bc9eeb4..218f8b620f 100644 --- a/core/server/public/members.js +++ b/core/server/public/members.js @@ -118,19 +118,3 @@ Array.prototype.forEach.call(document.querySelectorAll('[data-members-signout]') } el.addEventListener('click', clickHandler); }); - -var magicLinkRegEx = /token=([a-zA-Z0-9_\-]+\.[a-zA-Z0-9_\-]+\.[a-zA-Z0-9_\-]+)/; -var match = location.search.match(magicLinkRegEx); -var isMagicLink = !!match -var token = match && match[1]; - -if (isMagicLink) { - fetch('{{blog-url}}/members/ssr', { - method: 'POST', - body: token - }).then(function (res) { - if (res.ok) { - window.location.search = window.location.search.replace(magicLinkRegEx, ''); - } - }); -} diff --git a/core/server/web/site/app.js b/core/server/web/site/app.js index 44e4a01be6..8f2e36dd6b 100644 --- a/core/server/web/site/app.js +++ b/core/server/web/site/app.js @@ -142,16 +142,7 @@ module.exports = function setupSiteApp(options = {}) { res.end(err.message); }); }); - siteApp.post('/members/ssr', shared.middlewares.labs.members, function (req, res) { - membersService.ssr.exchangeTokenForSession(req, res).then(() => { - res.writeHead(200); - res.end(); - }).catch((err) => { - common.logging.warn(err.message); - res.writeHead(err.statusCode); - res.end(err.message); - }); - }); + siteApp.delete('/members/ssr', shared.middlewares.labs.members, function (req, res) { membersService.ssr.deleteSession(req, res).then(() => { res.writeHead(204);