-
-
Notifications
You must be signed in to change notification settings - Fork 758
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changed auth architecture for clerk #2739
base: main
Are you sure you want to change the base?
Conversation
Hi, this PR does have some issues. Im not sure but I dont think navigations should cause big performance issues as clerk should store auth info in session which should be fast. Atleast that was the case with the nextjs implementation. So maybe your performance issues do have other root cause. For reference here are the clerk tanstack start docs: https://clerk.com/docs/references/tanstack-start/get-auth |
@EugenEistrach The state of the auth can be obtained through clerk given I'm trying tanstack-start on production(even though it is not recommended) and this sluggish feel is a problem. I'm don't have much understanding with tanstack router. So correct me if I'm wrong |
I think Milton is 💯 I have encountered this exact design bug in multiple flows by now. The |
I agree with @MiltonAkash and @datner, commenting for update. I am using start as well alongside clerk and yes, the current setup showcased has its purpose and I assume is to convey how we can fetch, throw and catch it on the error component all happening within the Route definition. However, every route change under the auth layout calls this serverfn whilst the SignedIn component should be able to take care of this on the Route component. |
How about setting |
Current architecture using beforeLoad fetched auth on every route change making lag on navigation resulting bad UX