Logout: localStorage.clear
authorLoic Baron <loic.baron@lip6.fr>
Wed, 21 Jan 2015 16:14:49 +0000 (17:14 +0100)
committerLoic Baron <loic.baron@lip6.fr>
Wed, 21 Jan 2015 16:14:49 +0000 (17:14 +0100)
auth/static/js/logout.js

index 593eb58..3419b9d 100644 (file)
@@ -5,7 +5,7 @@ function logout () {
     var msg="Are you sure you want to logout as " + username + " ?";
     /* redirect to /logout, see urls.py */
     if (confirm(msg)){
-        localStorage.removeItem('user');
+        localStorage.clear();
         window.location="/logout/";
     }
 }