-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
feat: update auth documentation for app router #1894
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@akshithio is attempting to deploy a commit to the t3-oss Team on Vercel. A member of the Team first needs to authorize it. |
i could add an additional commit to this pr to fix #1889 too maybe? |
@@ -39,27 +46,33 @@ const User = () => { | |||
|
|||
## Retrieving session server-side |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe this should be split to 2 sections (pages and app)
the old pages setup is still relevant afaik?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure i understand? The pages setup is still very relevant but i thought a warning might be a good call. In theory, the server-side retrieval section serves as the "other section" that explains how auth works in app router situations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you removed the gSSP part of the docs explaining how to retrieve session on the server in pages router.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand what you mean now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still a bit hesitant about removing the gSSP pattern as there's been some issues reporting invalid usage and these docs sort of fixed that.
You could add a toggle for this session like #1900 maybe?
We should have a more global switch later, but for now having a tab switch in individual places where it makes sense will have to be good enough 😅
Did not see that PR before! Seems like an easy enough change, I'll do that by tomorrow! Should I also add another commit into this same pr to fix #1889 because it's a similar sort of issue or would you prefer I open a different pr for that after this is closed? |
Sure! Whatever is easiest for you. |
I think I'd have to add an additional dependency in the form p.s. i have negligible experience working with either mdx or astro, please let me know if there's something obvious i'm missing. |
you can make a react component that conditionally renders children based on some condition so <PagesOnly>
Use gSSP...
</PagesOnly>
<AppOnly>
Await in an RSC...
</AppOnly> |
The trpc stuff was fixed in ff32e08 Feel free to reopen for the auth changes if you get the time for it in the future |
Closes #1882
✅ Checklist
Changelog
Update sections about server-side fetching and use of tRPC + add warning about Client Provider section to highlight that it is relevant only to the use of the
/pages
router. Change one outdated hyperlink and add additional context in few areas for user clarity.Screenshots
[Screenshots]
💯