-
Notifications
You must be signed in to change notification settings - Fork 27.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Parent segments must be prefetched before children
Create an access token that the client passes when requesting a segment. The token is sent to the client as part of the parent layout's data. The token is hash of the parent segment path and the parallel route key. A subtle detail here is that it does *not* include the value of the segment itself — a shared layout must produce the same access tokens for its children regardless of their segment values, so that the client only has to fetch the layout once. Because this only affects prefetches, this doesn't need to be secure. It's just for obfuscation. But eventually we will use this technique when performing dynamic navigations, to support auth checks in a layout that conditionally renders its slots. At that point we'll need to add a salt.
- Loading branch information
Showing
2 changed files
with
118 additions
and
34 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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