Fix migration for servers without refresh tokens

This commit is contained in:
N-Pex 2026-01-13 11:38:14 +01:00
parent 102fb79089
commit b1b793edc4

View file

@ -149,8 +149,13 @@ export default {
baseUrl: baseUrl,
idBaseUrl: this.$config.identityServer,
});
user.access_token = undefined;
user.device_id = tempMatrixClient.getSessionId();
return this.refreshAccessToken(tempMatrixClient, user.refresh_token);
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);