Support authentication flows for login/register

This commit is contained in:
N Pex 2023-04-04 14:30:50 +00:00
parent d86ee3b1e3
commit 0d3781f3aa
11 changed files with 481 additions and 139 deletions

View file

@ -63,7 +63,7 @@ export default {
})
.catch((error) => {
console.log("Error creating client", error);
if (error.data.errcode ==='M_FORBIDDEN' && this.currentUser.is_guest) {
if (error.data && ((error.data.errcode ==='M_FORBIDDEN' && this.currentUser.is_guest) || error.data.errcode ==='M_USER_DEACTIVATED')) {
// 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);