-
Notifications
You must be signed in to change notification settings - Fork 1k
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: Reworks RSC server entries and route manifest building to derive from routes and include if route info related to authentication #10572
Merged
Merged
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
ecb5faf
Builds server entries from routes rather than pages
dthyresson 3e42a4c
A route is private if it has a parent PrivateSet
dthyresson 2b6ebf1
Adds isPrivate attribute to Route manifest
dthyresson 674a725
Add changeset
dthyresson dfdea38
Merge branch 'main' into dt-refactor-server-entries-from-routes
dthyresson 6416eba
Favor PrivateSet over Private in fixtures to authenticate routes. Tes…
dthyresson 569b510
Adds unauthenticated path to RWRoute model
dthyresson 74a9694
private redirect fix
dthyresson f7e35e8
update route manifest
dthyresson 01f47f4
Merge branch 'main' into dt-refactor-server-entries-from-routes
dthyresson 0f5b4f2
Had extraneous exp typo import
dthyresson 9e9f062
remove console
dthyresson 400580f
Add roles to building route manifest
dthyresson 92659c3
Merge branch 'main' into dt-refactor-server-entries-from-routes
dthyresson 778929a
improve changeset
dthyresson 0ace4af
Merge branch 'main' into dt-refactor-server-entries-from-routes
dthyresson 2e7bf8b
Merge branch 'main' into dt-refactor-server-entries-from-routes
dthyresson ba02c65
Merge branch 'main' into dt-refactor-server-entries-from-routes
dthyresson 4584164
fix windows ci?
dthyresson 6418794
Rename RWPage's const to constName
dthyresson 7184362
Merge branch 'main' into dt-refactor-server-entries-from-routes
dthyresson a2ac9fc
Merge branch 'main' into dt-refactor-server-entries-from-routes
dthyresson File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
- feat: feat: Reworks RSC server entries and route manifest building to derive from routes and include if route info related to authentication (#10572) by @dthyresson | ||
|
||
This PR is in furtherance of authentication support in RSC. | ||
|
||
It refactors: | ||
|
||
- How server entries are built -- not from "processing the pages dir" (which is a deprecated function) but rather the routes ... and the page info for that route. Note here that a page can be used in multiple routes, so the auth info cannot really be determined here. | ||
|
||
- The route manifest building to include per route: | ||
|
||
* isPrivate - is the route private, i.e, is it wrapped in a PrivateSet | ||
* unauthenticated - what route to navigate to if the user in not authenticated | ||
* roles - the roles to check to see if user has the require RBAC permission to navigate to the route | ||
|
||
Now if some page, route request is being handled by RSC we might be able to check if it "isPrivate" and enforce auth with the roles and even where tp redirect to if not authenticated. |
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
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.
Do we really need to keep "Private"? I think it has to be "PrivateSet" 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.
I would say lets remove
Private
in a separate PR, and remove it from exports too!