From be38392192a358d31f2d0591fdef03e39689e772 Mon Sep 17 00:00:00 2001 From: Danny Coates Date: Mon, 5 Nov 2018 15:56:59 -0800 Subject: [PATCH] log out when the auth token is expired --- app/user.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/user.js b/app/user.js index 980e53fc..04c3d4c5 100644 --- a/app/user.js +++ b/app/user.js @@ -128,7 +128,9 @@ export default class User { ); list = JSON.parse(textDecoder.decode(decrypted)); } catch (e) { - // + if (e.message === '401') { + return this.logout(); + } } changes = await this.storage.merge(list); if (!changes.outgoing) {