Last active
July 31, 2019 22:01
-
-
Save rgoytacaz/c6349613ff26d12f0891e590132ea32b to your computer and use it in GitHub Desktop.
Example Logout
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//dependencies jquery e jquery cookie | |
//https://plugins.jquery.com/cookie/ | |
function logout(){ | |
$.removeCookie('VTEXSC', {domain:'.'+window.document.domain}); | |
$.removeCookie('checkout.vtex.com', {domain:'.'+window.document.domain}); | |
$.get(vtexjs.checkout.getLogoutURL()); | |
$.get('/no-cache/user/logout'); | |
setTimeout(function(){window.location = "",500); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment