Wipe guest accounts on password errors
This commit is contained in:
parent
e49f6e81c3
commit
dc61bb2ba7
3 changed files with 19 additions and 2 deletions
|
|
@ -63,6 +63,13 @@ export default {
|
|||
})
|
||||
.catch((error) => {
|
||||
console.log("Error creating client", error);
|
||||
if (error.data.errcode ==='M_FORBIDDEN' && this.currentUser.is_guest) {
|
||||
// Guest account and password don't work. We are in a strange state, probably because
|
||||
// of server cleanup of accounts or similar. Wipe account and restart...
|
||||
this.$store.commit("setUser", null);
|
||||
this.$store.commit("setCurrentRoomId", null);
|
||||
this.$navigation.push({ path: "/login" }, -1);
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
this.loading = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue