Skip to content

πŸ› Guard soft-refresh navigation and signout raceΒ #4459

Closed

Description

@PierreBrisorgueil

What β€” Right after creating an organization a user can be bounced back to the "no workspace" wall; and a late-resolving refresh can un-logout a user who just signed out.
Why β€” A soft-refresh action that never throws is followed by unconditional navigation / has no in-flight guard against signout.

Scope β€”

  • src/modules/organizations/views/organization.create.view.vue (~L111): await authStore.token(); this.$router.push(...) with no check that the refresh populated authStore.user.currentOrganization. token() swallows failures, so a transient blip leaves currentOrganization falsy and the app-router org-guard bounces the just-created org back to /organization-required. Same class fixed in verifyEmail.view.vue (fix(auth,organizations): surface failures in org-create and email-verification flowsΒ #4451) and guarded in organizations.required.view.vue; this sibling from the fix(auth,organizations): soft-refresh (token) at onboarding sites to prevent silent sign-outΒ #4431 batch was missed. ERRORS.md (2026-07-16) documents the pattern.
  • src/modules/auth/stores/auth.store.js signout() (~L287): no generation/in-flight guard shared with token()/refreshAbilities(). A token() dispatched before a concurrent signout() can resolve after it and re-populate auth=true/user/localStorage. Reachable from organizations.required.view.vue (Check-status + Sign-out on one screen).

Fix: guard the org-create navigation on authStore.user?.currentOrganization (mirror the sibling views); add an in-flight/generation guard so a soft-refresh continuation cannot write auth state after signout(). Tests: org-create failure path stays on page; signout wins the race.

Refs: internal audit cycle-1 2026-07-16 (H2 + M4); follows #4431/#4451.
Created via /dev:issue

Activity

  1. PierreBrisorgueil commented on Jul 16, 2026

    @PierreBrisorgueil
    CollaboratorAuthor

    WIP β€” claimed by autonomous agent at 2026-07-16 20:51:53 UTC

  2. added a commit that references this issue on Jul 16, 2026
    6a2546e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions