From 820af563879fbf945092d2230f1e2fde0c860ca0 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Thu, 2 May 2019 09:55:29 -0700 Subject: Externalizing JWT token --- ui/src/components/navbar.tsx | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ui/src/components/navbar.tsx') diff --git a/ui/src/components/navbar.tsx b/ui/src/components/navbar.tsx index 6861461c..84471145 100644 --- a/ui/src/components/navbar.tsx +++ b/ui/src/components/navbar.tsx @@ -144,6 +144,10 @@ export class Navbar extends Component { parseMessage(msg: any) { let op: UserOperation = msgOp(msg); if (msg.error) { + if (msg.error == "Not logged in.") { + UserService.Instance.logout(); + location.reload(); + } return; } else if (op == UserOperation.GetReplies) { let res: GetRepliesResponse = msg; -- cgit v1.2.3