Log out: Difference between revisions
From ASDSO Dam Safety Toolbox
No edit summary |
No edit summary |
||
Line 46: | Line 46: | ||
} | } | ||
} | } | ||
function logOut() { | function logOut() { | ||
// Clear cookie by setting the expiration date to one day ago | |||
// Clear cookie by setting the expiration date to one | var cookieName = 'remoteUserEmail'; | ||
var cookieValue = ''; | |||
var myDate = new Date(); | |||
myDate.setDate(myDate.getDate()-1); | |||
document.cookie = cookieName +"=" + cookieValue + ";expires=" + myDate + ";domain=damtoolbox.org;path=/"; | |||
// Navigate to Impexium site and logout there | // Navigate to Impexium site and logout there | ||
setTimeout(function() { | setTimeout(function() { | ||
window.location.href = 'https://asdso.mpxstage.com/account/logout.aspx'; | |||
}, 3000); | }, 3000); | ||