summaryrefslogtreecommitdiffstats
path: root/ui/src/components/navbar.tsx
diff options
context:
space:
mode:
authorDessalines <tyhou13@gmx.com>2019-05-02 09:55:29 -0700
committerDessalines <tyhou13@gmx.com>2019-05-02 09:55:29 -0700
commit820af563879fbf945092d2230f1e2fde0c860ca0 (patch)
tree5a5c9693c291cac1672ddb0dadae46940517ff64 /ui/src/components/navbar.tsx
parent9d3b4de4362e39b05ef759372aecf66da2b14c3b (diff)
Externalizing JWT token
Diffstat (limited to 'ui/src/components/navbar.tsx')
-rw-r--r--ui/src/components/navbar.tsx4
1 files changed, 4 insertions, 0 deletions
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<any, NavbarState> {
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;