forked from redwoodjs/redwood
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of github.com:redwoodjs/redwood into feat/extract…
…-role-authmw * 'main' of github.com:redwoodjs/redwood: fix(dbAuthMw): Update and fix logic related to dbAuth "verbs" and decryptionErrors (redwoodjs#10668) RSC: routes-auto-loader is not used for SSR anymore (redwoodjs#10672) chore(crwa): Remove unused jest dev dependency (redwoodjs#10673) RSC: rscBuildEntriesFile: Only ServerEntry and Routes needed for serverEntries (redwoodjs#10671) RSC: clientSsr: getServerEntryComponent() (redwoodjs#10670) RSC: worker: getFunctionComponent -> getRoutesComponent (redwoodjs#10669) RSC: kitchen-sink: Make the ReadFileServerCell output take up less space (redwoodjs#10667) RSC: Remove commented code related to prefixToRemove transform() (redwoodjs#10666) RSC Client Router (redwoodjs#10557) RSC: Add 'use client' to remaining client cells in kitchen-sink (redwoodjs#10665) RSC: vite auto-loader: Spell out 'path' and other chores (redwoodjs#10662) fix(cli): Handle case for no arguments for verbose baremetal deploy (redwoodjs#10663) RSC: kitchen-sink: Make it more clear where layout ends and main content starts (redwoodjs#10661) RSC: Make the kitchen-sink smoke-test more robust/resilient (redwoodjs#10660) RSC: Source format of EmptyUsersCell in kitchen-sink (redwoodjs#10658) RSC: Add 'use client' to all client cells in kitchen-sink (redwoodjs#10659) chore(__fixtures__): Follow-up: Make test projects match newer CRWA template (redwoodjs#10657) feat: Reworks RSC server entries and route manifest building to derive from routes and include if route info related to authentication (redwoodjs#10572) chore(__fixtures__): Make test projects match newer CRWA template (redwoodjs#10655)
- Loading branch information
Showing
58 changed files
with
951 additions
and
362 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
- fix(cli): Handle case for no arguments for verbose baremetal deploy (#10663) by @Josh-Walker-GM | ||
|
||
The change corrects a bug during baremetal deployments when using the `--verbose` flag. See #10654 for more details. | ||
|
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,10 @@ | ||
- fix(dbAuthMw): Update and fix logic related to dbAuth "verbs" and decryptionErrors (#10668) by @dac09 | ||
|
||
This PR does the following: | ||
- updates the dbauth mw to correctly handle the cookieName option (it should always have been optional) | ||
- throws an error when the `dbAuthSession` returns an empty decoded token so that it clears the authState | ||
- we had a check for only "POST" requests to be passed to the dbAuthHandler. This was incorrect because some of the dbAuth "verbs" or actions - like `webAuthnRegOptions` - uses a GET request. | ||
|
||
As a result, the tests started showing failures, so I: | ||
- added a mock for `dbAuthSession`, so we can check both happy path and unhappy paths for session decryption | ||
- updated the tests where relevant |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,22 @@ | ||
import type { TagDescriptor } from '@redwoodjs/web/dist/components/htmlTags' | ||
|
||
import { Document } from './Document' | ||
import Routes from './Routes' | ||
|
||
interface Props { | ||
css: string[] | ||
meta?: TagDescriptor[] | ||
location: { | ||
pathname: string | ||
hash?: string | ||
search?: string | ||
} | ||
} | ||
|
||
export const ServerEntry: React.FC<Props> = ({ css, meta }) => { | ||
export const ServerEntry: React.FC<Props> = ({ css, meta, location }) => { | ||
return ( | ||
<Document css={css} meta={meta}> | ||
<div>App</div> | ||
<Routes location={location} /> | ||
</Document> | ||
) | ||
} |
6 changes: 5 additions & 1 deletion
6
__fixtures__/test-project-rsa/web/src/layouts/NavigationLayout/NavigationLayout.tsx
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.