Fix user being "logged out" after upgrading (#1798)
This commit is contained in:
parent
e19b6a08d3
commit
3055a43ec8
1 changed files with 9 additions and 1 deletions
10
app/app.js
10
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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue