Login on reload
To get a new access_token if the old one has expired. Should fix issue #36.
This commit is contained in:
parent
5645e32cf0
commit
933de4a2ec
5 changed files with 64 additions and 18 deletions
|
|
@ -157,7 +157,7 @@ export default {
|
|||
this.waitingForMembership = true;
|
||||
const self = this;
|
||||
this.$matrix
|
||||
.getMatrixClient(this.currentUser)
|
||||
.login(this.currentUser)
|
||||
.then(() => {
|
||||
self.$matrix.setCurrentRoomId(self.roomId); // Go to this room, now or when joined.
|
||||
|
||||
|
|
@ -246,7 +246,7 @@ export default {
|
|||
this.loadingMessage = "Logging in...";
|
||||
var clientPromise;
|
||||
if (this.currentUser) {
|
||||
clientPromise = this.$matrix.getMatrixClient(this.currentUser);
|
||||
clientPromise = this.$matrix.login(this.currentUser);
|
||||
} else {
|
||||
clientPromise = this.$store.dispatch("auth/login", this.guestUser);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue