Skip to content
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

fix(dbauth-mw): Use response passed in to middleware #10516

Merged
merged 4 commits into from
Apr 26, 2024

Conversation

dac09
Copy link
Collaborator

@dac09 dac09 commented Apr 26, 2024

Middleware can be chained - which means if auth middleware is not the first one on the list of middleware being registered, we need to use the MiddlewareResponse that gets passed to the middleware, instead of creating a new one.

Also adds test for the positive case where a valid cookie gets decrypted, and sets server auth context.

@dac09 dac09 added the release:fix This PR is a fix label Apr 26, 2024
@dac09 dac09 added this to the SSR milestone Apr 26, 2024
@dac09 dac09 self-assigned this Apr 26, 2024
@dac09
Copy link
Collaborator Author

dac09 commented Apr 26, 2024

@dthyresson for reference tagging you here. We already discussed so merging.

@dac09 dac09 enabled auto-merge (squash) April 26, 2024 09:53
@dac09 dac09 merged commit d8ee4cd into redwoodjs:main Apr 26, 2024
46 checks passed
dac09 added a commit that referenced this pull request Apr 26, 2024
…g-gen-mw-p2

* 'main' of github.com:redwoodjs/redwood:
  RSC: Add RSC+SSR smoke test to CI (#10477)
  fix(dbauth-mw): Use response passed in to middleware (#10516)
  Add redwood.toml to `yarn rw info` (#10518)
  chore(tests): Fix packages/web tests (#10517)
  fix(dbauth-mw): Unset cookie instead of clearing (#10502)
  chore(deps): Upgrade to React canary 20240424 (#10513)
  chore(deps): Upgrade to React Testing Library 14.3.1 (#10514)
  feat(upgrade): Use GitHub token if available when downloading patches (#10515)
dac09 added a commit to dac09/redwood that referenced this pull request May 1, 2024
…e-middleware-client

* 'main' of github.com:redwoodjs/redwood:
  chore(server-auth): Automagic middleware auth on supported providers (dbAuth so far) (redwoodjs#10529)
  feat(baremetal): Add more details to error messages (redwoodjs#10527)
  feat(baremetal): Add verbose output to ssh exec (redwoodjs#10525)
  Fix typos in seo-head (`<Metadata />`) docs (redwoodjs#10526)
  chore(cli): Wrap NodeSSH to make sshExec an instance method (redwoodjs#10524)
  Fix broken Azure / MSAL documentation links (redwoodjs#10505)
  chore(deps): Stop using PR build of rehackt - use proper version (redwoodjs#10523)
  feat(og-gen): Implement middleware and hooks (redwoodjs#10469)
  RSC: Rename RSC CI test case (redwoodjs#10521)
  feat(eslint): Disable restricted $api imports for entryserver (redwoodjs#10520)
  RSC: Add RSC+SSR smoke test to CI (redwoodjs#10477)
  fix(dbauth-mw): Use response passed in to middleware (redwoodjs#10516)
@Josh-Walker-GM Josh-Walker-GM modified the milestones: SSR, v8.0.0 Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release:fix This PR is a fix
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants