I'm currently testing on my local machine so the URL is as following when the user presses Sign out
// The ********** is my site name, which i don't want releasing yet
http://localhost:8080/**********/logout/
Local storage item:
Key: tkn Value: EE8D9DA0F1D71A0BE8B80F3BA80343555655871151tk16
the following tests i've tried:
if (localStorage.getItem('tkn')) {
localStorage.clear();
}
if (localStorage.getItem('tkn')) {
localStorage.removeItem('tkn');
}
// I've also ran these both tests in the console of the browser
// and they return back 'undefined' but the item is cleared.
However when I sign out
, the user session is removed completely fine. However the localStorage doesn't seem to be cleared.
Could someone shred some light on this for me?