Fix migration for servers without refresh tokens
This commit is contained in:
parent
102fb79089
commit
b1b793edc4
1 changed files with 6 additions and 1 deletions
|
|
@ -149,8 +149,13 @@ export default {
|
|||
baseUrl: baseUrl,
|
||||
idBaseUrl: this.$config.identityServer,
|
||||
});
|
||||
user.access_token = undefined;
|
||||
user.device_id = tempMatrixClient.getSessionId();
|
||||
if (user.refresh_token) {
|
||||
return this.refreshAccessToken(tempMatrixClient, user.refresh_token);
|
||||
} else {
|
||||
return Promise.resolve(true);
|
||||
}
|
||||
}).then(() => {
|
||||
console.log("Refresh done, normal login");
|
||||
return this.login(user, undefined, false, true);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue