Clerk Billing & Protected Routes
Has anyone integrated clerk billing into their tanstack start routes? Wanted to know how their <Protected/> components are working for y'all with loaders in the route?
Example:
I don't want to allow a user to access my /dashboard route unless they're subscribed and authenticated.
If they're authenticated and not subscribed, should either go to /onboarding or /subscribe based off their states
4 Replies
exotic-emeraldOP•4mo ago
Seems this might work instead of forcing the user to /subscribe route:
ambitious-aqua•4mo ago
Is this what you mean?
exotic-emeraldOP•4mo ago
I think that's effectively the same as what I have above? 😮
ambitious-aqua•4mo ago
It’s similar, but I made a small tweak here
just in case it helps