clerk/javascript

<OrganizationList /> `afterCreateOrganizationUrl` never called

oferitz opened this issue · 4 comments

Preliminary Checks

Reproduction

Publishable key

pk_test_Z3JhdGVmdWwtYmxvd2Zpc2gtMjQuY2xlcmsuYWNjb3VudHMuZGV2JA

Description

I'm using the OrganizationList component as follows:

     
        afterCreateOrganizationUrl="/after-create"
        afterSelectOrganizationUrl="/after-select"
        hidePersonal
      />

And it seems that no matter what afterCreateOrganizationUrl is never called upon submitting the Create organization form. it is always redirecting to the afterSelectOrganizationUrl in this case /after-select. i tried with or without skipInvitationScreen and with and without existing organization to select from.

Reproduce:

  1. Setup a page like the above
  2. Click on CREATE ORGANIZATION button

1

  1. Submit 'CREATE ORGANIZTION`

2

  1. always redirecting to here:

3

Worth mention that afterSelectOrganizationUrl working as expected upon selecting an existing org from the list

4

3

Environment

System:
    OS: macOS 14.4.1
    CPU: (11) arm64 Apple M3 Pro
    Memory: 1.64 GB / 36.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.11.1 - /usr/local/bin/node
    npm: 10.2.4 - /usr/local/bin/npm
    pnpm: 8.15.5 - /opt/homebrew/bin/pnpm
  Browsers:
    Chrome: 123.0.6312.122
    Safari: 17.4.1
  npmPackages:
    @biomejs/biome: 1.6.3 => 1.6.3 
    @clerk/clerk-sdk-node: 4.13.14 => 4.13.14 
    @clerk/nextjs: 4.29.12 => 4.29.12 
    @clerk/themes: 1.7.10 => 1.7.10 
    @clerk/types: 3.63.0 => 3.63.0 
    @datadog/browser-rum: 5.14.0 => 5.14.0 
    @hookform/resolvers: 3.3.4 => 3.3.4 
    @nextui-org/react: 2.2.10 => 2.2.10 
    @playwright/test: 1.42.1 => 1.42.1 
    @splitsoftware/splitio-react: 1.11.1 => 1.11.1 
    @tanstack/react-query: 5.28.14 => 5.28.14 
    @tanstack/react-table: 8.15.3 => 8.15.3 
    @testing-library/react: 14.2.2 => 14.2.2 
    @types/node: 20 => 20.11.30 
    @types/react: 18 => 18.2.73 
    @types/react-dom: 18 => 18.2.24 
    @vitejs/plugin-react: 4.2.1 => 4.2.1 
    autoprefixer: 10.4.18 => 10.4.18 
    axios: 1.6.8 => 1.6.8 
    clsx: 2.1.0 => 2.1.0 
    dayjs: 1.11.10 => 1.11.10 
    fast-deep-equal: 3.1.3 => 3.1.3 
    framer-motion: 11.0.24 => 11.0.24 
    jotai: 2.8.0 => 2.8.0 
    jsdom: 24.0.0 => 24.0.0 
    lucide-react: 0.364.0 => 0.364.0 
    next: 14.1.4 => 14.1.4 
    next-themes: 0.2.1 => 0.2.1 
    nextjs-toploader: 1.6.11 => 1.6.11 
    orval: 6.26.0 => 6.26.0 
    postcss: 8 => 8.4.38 
    prettier: 3.2.5 => 3.2.5 
    react: 18 => 18.2.0 
    react-confetti: 6.1.0 => 6.1.0 
    react-dom: 18 => 18.2.0 
    react-hook-form: 7.51.2 => 7.51.2 
    reactflow: 11.11.0 => 11.11.0 
    recharts: 2.12.3 => 2.12.3 
    sonner: 1.4.41 => 1.4.41 
    tailwind-merge: 2.2.2 => 2.2.2 
    tailwindcss: 3.4.3 => 3.4.3 
    typescript: 5 => 5.4.2 
    vite-tsconfig-paths: 4.3.2 => 4.3.2 
    vitest: 1.4.0 => 1.4.0 
    zod: 3.22.4 => 3.22.4

Hey @oferitz - I'm so sorry but we were not able to reproduce this issue when we tried. Could you create a minimal reproduction and send that over? As long as we're able to reproduce we can look into a fix!

Thanks for the fix. When can I expect this fix to arrive in v5

It should be already in v5, i was shipped before v4. Let me know if you still have issues.

v5 is out of beta as well :)

Tested and found to be working in V5. Thanks again; I'm closing the issue