Skip to content

authorizedParties treated as array of undefined in clerk/react-router #4960

@alexdibattista

Description

@alexdibattista

Preliminary Checks

Reproduction

https://github.com/alexdibattista/clerk-ts-issue/

Publishable key

pk_test_dW5pdGVkLW1hc3RpZmYtMTIuY2xlcmsuYWNjb3VudHMuZGV2JA

Description

Image

Steps to reproduce:

  1. Set the authorizedParties in the @clerk/react-router rootAuthLoader
  2. see the typescript error Type 'string' is not assignable to type 'undefined'

The offending line can be found here:

authorizedParties?: [];

Expected behavior:

authorizedParties is of type string[]

Actual behavior:

authorizedParties is of type []

Environment

System:
    OS: macOS 13.6
    CPU: (8) arm64 Apple M1 Pro
    Memory: 87.30 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 22.11.0 - ~/.asdf/installs/nodejs/22.11.0/bin/node
    Yarn: 1.22.22 - ~/.yarn/bin/yarn
    npm: 10.9.0 - ~/.asdf/plugins/nodejs/shims/npm
    pnpm: 10.0.0 - ~/.asdf/installs/nodejs/22.11.0/bin/pnpm
  Browsers:
    Chrome: 131.0.6778.266
    Safari: 16.6
  npmPackages:
    @clerk/react-router: ^0.2.2 => 0.2.2 
    @react-router/dev: ^7.1.3 => 7.1.3 
    @react-router/node: ^7.1.3 => 7.1.3 
    @react-router/serve: ^7.1.3 => 7.1.3 
    @types/node: ^20 => 20.17.14 
    @types/react: ^19.0.1 => 19.0.7 
    @types/react-dom: ^19.0.1 => 19.0.3 
    autoprefixer: ^10.4.20 => 10.4.20 
    isbot: ^5.1.17 => 5.1.21 
    postcss: ^8.4.49 => 8.5.1 
    react: ^19.0.0 => 19.0.0 
    react-dom: ^19.0.0 => 19.0.0 
    react-router: ^7.1.3 => 7.1.3 
    tailwindcss: ^3.4.16 => 3.4.17 
    typescript: ^5.7.2 => 5.7.3 
    vite: ^5.4.11 => 5.4.14 
    vite-tsconfig-paths: ^5.1.4 => 5.1.4

Metadata

Metadata

Assignees

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