From 992d00f067e39e0859fe82c976ce01598a94c7c4 Mon Sep 17 00:00:00 2001 From: Massedil Date: Sat, 28 Jun 2025 18:35:47 +0200 Subject: [PATCH] fix(login): remove the redirect to CREATE_IDENTITY in Navbar This redirect is triggered when identities changes during the login process and interrupt it. Identity redirect is already checked inside the login process. Related to #1806 --- src/components/NavBar.vue | 15 --------------- src/views/User/LoginView.vue | 5 ----- 2 files changed, 20 deletions(-) diff --git a/src/components/NavBar.vue b/src/components/NavBar.vue index 208112b29..4c8737085 100644 --- a/src/components/NavBar.vue +++ b/src/components/NavBar.vue @@ -334,21 +334,6 @@ watch(currentActor, async (currentActorValue, previousActorValue) => { onMounted(() => {}); -watch(identities, () => { - // If we don't have any identities, the user has validated their account, - // is logging for the first time but didn't create an identity somehow - if (identities.value && identities.value.length === 0) { - console.warn( - "We have no identities listed for current user", - identities.value - ); - console.info("Pushing route to CREATE_IDENTITY"); - router.push({ - name: RouteName.CREATE_IDENTITY, - }); - } -}); - const { onDone, mutate: setIdentity } = useMutation<{ changeDefaultActor: { id: string; defaultActor: { id: string } }; }>(UPDATE_DEFAULT_ACTOR); diff --git a/src/views/User/LoginView.vue b/src/views/User/LoginView.vue index 77cdf0967..4797f6708 100644 --- a/src/views/User/LoginView.vue +++ b/src/views/User/LoginView.vue @@ -229,11 +229,6 @@ const loginAction = async (e: Event) => { const loggedUserLocationPromise = loggedUserLocationQuery.load(); // Step 3b: Setuping user's identities - // FIXME this promise never resolved the first time - // no idea why ! - // this appends even with the last version of apollo-composable (4.0.2) - // may be related to that : https://github.com/vuejs/apollo/issues/1543 - // EDIT: now it works :shrug: const currentUserIdentitiesResult = await currentUserIdentitiesQuery.load(); if (!currentUserIdentitiesResult) { throw new Error("Loading user's identities failed");