Skip to content

Auto-switch redirects users to dashboard when navigating to create-org with an existing active organization #131

@escooterclinic

Description

@escooterclinic

Summary

When trying to create

Steps to reproduce

  1. Sign in and create an organization
  2. From the dashboard, open the org switcher and click "+ Create organization"
  3. Page briefly loads /onboarding/create-org then immediately redirects back to /dashboard

Expected behavior

The create-org page shows the organization creation form.

Actual behavior

When a user already has an active organization and navigates to /onboarding/create-org (e.g. via the org switcher's "+ Create organization" link), the watch in create-org.vue detects
orgs.length === 1 and immediately auto-switches to that org, redirecting back to /dashboard. This makes it impossible to create a second organization.

The auto-switch logic is intended for first-time users who have exactly one org but no active org set in their session (i.e. right after accepting an invitation). It should not fire
when the user already has an activeOrganizationId in their session, as that indicates they navigated to the page intentionally.

Version / commit

No response

Environment

No response

Logs / screenshots

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions