Skip to content

createServerFn().inputValidator() deprecation warning with TanStack Start #100

@frangkli

Description

@frangkli

Describe the bug
@workos/authkit-tanstack-react-start logs a TanStack Start deprecation warning in Vite dev because it still uses createServerFn().inputValidator(), which has been deprecated in favor of createServerFn().validator().

To Reproduce
Steps to reproduce the behavior:

  1. Create a TanStack Start app using @workos/authkit-tanstack-react-start.
  2. Add the WorkOS AuthKit setup, including routes/server functions that import helpers like getAuth, getSignInUrl, or signOut.
  3. Run the Vite dev server.
  4. See the warning in the terminal:
[vite+] (ssr) warning: .../@workos/authkit-tanstack-react-start/dist/server/actions.js?tss-serverfn-split:52:38 createServerFn().inputValidator() is deprecated. Use createServerFn().validator() instead.
Plugin: tanstack-start-core::server-fn:ssr

Expected behavior
The package should use the current TanStack Start API and avoid emitting deprecation warnings during development.

For example, usages like:

createServerFn({ method: 'POST' })
  .inputValidator((options?: { organizationId?: string }) => options)
  .handler(...)

should be updated to:

createServerFn({ method: 'POST' })
  .validator((options?: { organizationId?: string }) => options)
  .handler(...)

Screenshots
N/A

Desktop (please complete the following information):

  • OS: macOS
  • Browser: Chrome
  • authkit-tanstack-start version: 0.8.6
  • Tanstack Start version: 1.168.x

Additional context
N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions