From 3055a43ec8497ad94ceef376a4651f9ccfcc595f Mon Sep 17 00:00:00 2001 From: Elias Nahum Date: Thu, 21 Jun 2018 18:17:59 -0400 Subject: [PATCH] Fix user being "logged out" after upgrading (#1798) --- app/app.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/app/app.js b/app/app.js index e9db17855..7d989c435 100644 --- a/app/app.js +++ b/app/app.js @@ -76,6 +76,7 @@ export default class App { return Initialization.credentials; }, () => { + this.waitForRehydration = true; return getGenericPassword(); } ); @@ -153,6 +154,13 @@ export default class App { } const username = `${deviceToken}, ${currentUserId}`; const password = `${token},${url}`; + + if (this.waitForRehydration) { + this.waitForRehydration = false; + this.token = token; + this.url = url; + } + setGenericPassword(username, password); }; @@ -215,7 +223,7 @@ export default class App { }; startApp = () => { - if (this.appStarted) { + if (this.appStarted || this.waitForRehydration) { return; }