0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-04-15 03:01:37 -05:00

Removed token param on page load for members

no-issue

This adds a bit of protection from accidentally sharing the url, and
also makes the url look cleaner
This commit is contained in:
Fabien O'Carroll 2019-10-09 13:21:23 +07:00
parent dd419be2fb
commit 1e731dcdd3

View file

@ -138,3 +138,9 @@ Array.prototype.forEach.call(document.querySelectorAll('[data-members-signout]')
}
el.addEventListener('click', clickHandler);
});
var url = new URL(window.location);
if (url.searchParams.get('token')) {
url.searchParams.delete('token');
window.history.replaceState({}, document.title, url.href);
}