Closed chrabyrd closed 3 weeks ago
Actually, I'm showing this is fixed with just: diff --git a/arches_lingo/src/arches_lingo/components/user/UserInteraction.vue b/arches_lingo/src/arches_lingo/components/user/UserInteraction.vue index 9361665..def4c3e 100644 --- a/arches_lingo/src/arches_lingo/components/user/UserInteraction.vue +++ b/arches_lingo/src/arches_lingo/components/user/UserInteraction.vue @@ -20,11 +20,12 @@ const { $gettext } = useGettext(); const toast = useToast(); const router = useRouter(); -const { user } = inject(USER_KEY) as UserRefAndSetter; +const { user, setUser } = inject(USER_KEY) as UserRefAndSetter; const issueLogout = async () => { try { await logout(); + setUser(null); router.push({ name: routeNames.login }); } catch (error) { toast.add({
Actually, I'm showing this is fixed with just:
diff --git a/arches_lingo/src/arches_lingo/components/user/UserInteraction.vue b/arches_lingo/src/arches_lingo/components/user/UserInteraction.vue index 9361665..def4c3e 100644 --- a/arches_lingo/src/arches_lingo/components/user/UserInteraction.vue +++ b/arches_lingo/src/arches_lingo/components/user/UserInteraction.vue @@ -20,11 +20,12 @@ const { $gettext } = useGettext(); const toast = useToast(); const router = useRouter(); -const { user } = inject(USER_KEY) as UserRefAndSetter; +const { user, setUser } = inject(USER_KEY) as UserRefAndSetter; const issueLogout = async () => { try { await logout(); + setUser(null); router.push({ name: routeNames.login }); } catch (error) { toast.add({
True, but then we lose the feature of dealing with if a user has logged out in the Arches (not lingo) application. I know requesting the user every page isn't ideal but IMO it's better/safer.
Ah, I forgot about that case. Approving!
True, but then we lose the feature of dealing with if a user has logged out in the Arches (not lingo) application. I know requesting the user every page isn't ideal but IMO it's better/safer.