Update examples for Clerk and TanStack Start documentation#2970
Merged
SarahSoutoul merged 6 commits intomainfrom Jan 16, 2026
Merged
Update examples for Clerk and TanStack Start documentation#2970SarahSoutoul merged 6 commits intomainfrom
SarahSoutoul merged 6 commits intomainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
octoper
approved these changes
Jan 16, 2026
wobsoriano
approved these changes
Jan 16, 2026
Member
wobsoriano
left a comment
There was a problem hiding this comment.
left a comment but this looks good!
docs/_partials/billing/checking-permission-using-has-function.mdx
Outdated
Show resolved
Hide resolved
manovotny
approved these changes
Jan 16, 2026
alexisintech
approved these changes
Jan 16, 2026
Member
alexisintech
left a comment
There was a problem hiding this comment.
awesome catches! thanks sarah 🙏 😸💖
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🔎 Previews:
What does this solve?
While both
beforeLoadandloaderrun on the server, they also execute on the client during navigation. Because of this, usingauth()(andhas()) directly insidebeforeLoadorloaderis incorrect. Instead,auth()andhas()should only be used insidecreateServerFn. Any permission or auth-based checks should be computed there, and the resulting data can then be safely consumed inbeforeLoadorloader.The current examples also rely on the deprecated
getAuth, which further contributes to the confusion.What changed?
auth()(andhas()) directly insidebeforeLoadorloader.