From 4dcfcea4256c61ebfbc4f494bb461860cec61e67 Mon Sep 17 00:00:00 2001 From: nelsonic Date: Mon, 13 Apr 2015 15:13:57 +0100 Subject: [PATCH] force logout ensures the session is destroyed on client (even if API/JWT errors) https://github.com/ideaq/time/issues/119 --- front/public/js/alpha.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/front/public/js/alpha.js b/front/public/js/alpha.js index 6a9fc61e..0ee4b345 100644 --- a/front/public/js/alpha.js +++ b/front/public/js/alpha.js @@ -468,7 +468,15 @@ $(document).ready(function() { }) }, error: function(xhr, err) { + console.log('LOGOUT - - - - - - - ERROR:') + console.log(xhr); console.log(err); + clear(); + return boot(function(){ + $('#nav').fadeOut(); + $('#login').fadeIn(); + $('#why').show(); + }) } }); }