fix(samples): add missing onClick handler and remove invalid signInUrl in tanstack-router sample - #573
Conversation
…l in tanstack-router sample
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe sample removes custom authentication route overrides. Both sign-in buttons now invoke the ChangesTanStack Router sign-in flow
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix · Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to No identified issue prevents merging the sign-in flow change after normal checks. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Purpose
This PR fixes a broken sign-in flow in the
react-tanstack-routersample application.The Problem:
SignInButtoninHome.tsxwas missing theonClickhandler when using the render-prop pattern, rendering the buttons completely non-functional.signInUrl="/signin"was incorrectly configured in theAsgardeoProviderinsidemain.tsx. Because the router has no/signinroute, clicking the button resulted in a "Not Found" routing error instead of initiating the Asgardeo OAuth flow.The Fix:
onClick={signIn}to the<button>elements inside the render-props inHome.tsx.signInUrlandsignUpUrlprops from theAsgardeoProviderconfiguration inmain.tsx, allowing the SDK to correctly default to the standard Asgardeo redirect flow.Related Issues
Related PRs
Summary by CodeRabbit