Skip to content

Bug: SignInButton render prop usage in "react-tanstack-router" sample missing "onClick={signIn}" #572

Description

@KavishkaVenuka

Description

The "SignInButton" render prop usage in the "react-tanstack-router" sample app (samples/react-tanstack-router/src/pages/Home.tsx) is missing the onClick={signIn} handler on the custom <button> elements.

This causes the "Sign In" and "Get Started" buttons to be completely non-functional, clicking them does nothing.
The render prop destructures only {isLoading} but ignores the signIn function:

tsx
// Current (broken) — Home.tsx lines 21-23
<SignInButton>
  {({isLoading}) => <button disabled={isLoading}>{isLoading ? 'Loading...' : 'Sign In'}</button>}
</SignInButton>

However, the SDK's own JSDoc in SignInButton.tsx (lines 42-48) documents the correct pattern:

tsx
// Expected (from SDK docs)
<SignInButton>
  {({signIn, isLoading}) => (
    <button onClick={signIn} disabled={isLoading}>
      {isLoading ? 'Signing in...' : 'Sign In'}
    </button>
  )}
</SignInButton>

Steps to Reproduce

  1. Run the sample app: >> cd samples/react-tanstack-router && pnpm dev
  2. Open "https://localhost:5173" in a browser
  3. Click the "Sign In" button, or the "Get Started" button
  4. Observe: Nothing happens. No redirect, no network request, no error in console

Please select the area the issue is related to

samples, @asgardeo/react

Version

b7fac26

Environment Details (with versions)

-OS: Ubuntu 24.04.4 LTS

  • Node.js: v24.11.1
  • Browser: Google Chrome 152.0.7977.82
  • Vite: 6.4.3
  • @tanstack/react-router: 1.154.7

Reporter Checklist

  • I have searched the existing issues and this is not a duplicate.
  • I have provided all the necessary information.
  • I have tested the issue on the latest version of the package.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions