mirror of
https://github.com/cloudflare/vinext.git
synced 2026-05-09 08:25:34 +02:00
[GH-ISSUE #85] RSC navigation fetch missing credentials: 'include' - cookies not sent during client-side navigation #25
Labels
No labels
enhancement
enhancement
good first issue
help wanted
nextjs-tracking
nextjs-tracking
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/vinext#25
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @CodyBontecou on GitHub (Feb 26, 2026).
Original GitHub issue: https://github.com/cloudflare/vinext/issues/85
Bug Description
RSC navigation and prefetch requests do not include
credentials: "include", which means cookies are not sent during client-side navigation. This breaks authentication for any app using cookie-based auth (e.g., Better Auth, NextAuth, etc.).Steps to Reproduce
/admin) that checks auth viacookies()orheaders()<Link>to the protected routeIf the user does a full page refresh on the protected route, it works correctly because the browser sends cookies with the full page request.
Root Cause
In
dist/server/app-dev-server.js, the RSC navigation fetch does not include credentials:Similarly, in
dist/shims/link.jsanddist/shims/navigation.js, prefetch requests also lack credentials:Suggested Fix
Add
credentials: "include"to all RSC fetch calls:Workaround
Use regular
<a>tags instead of<Link>for navigation to auth-protected routes. This forces a full page navigation that properly includes cookies.Environment