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

chore(serverAuth): Rename serverAuthContext to serverAuthState where relevant #10643

Merged

Conversation

dac09
Copy link
Contributor

@dac09 dac09 commented May 17, 2024

Why?
As we make auth available on RSC, we want to avoid the use of the word "context"

  1. Because context is over used
  2. It's confusing because RSCs don't support React.context

This PR renames serverAuthContext -> serverAuthState. The only case it doesn't change it is the actual ServerAuthContext which we use for SSR/Streaming

@dac09 dac09 requested a review from dthyresson May 17, 2024 12:31
@dac09 dac09 self-assigned this May 17, 2024
@dac09 dac09 added the release:chore This PR is a chore (means nothing for users) label May 17, 2024
@dac09 dac09 added this to the SSR milestone May 17, 2024
Copy link
Contributor

@dthyresson dthyresson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small comment re "AuthStateJar" vs "ServerAuthJar".

Will leave to youth pick naming.

LGTM and approved!

@dac09
Copy link
Contributor Author

dac09 commented May 20, 2024

Will leave to "youth" picking name

Freudian slip? Shakspearean language? Who knows 🤣. But i'll rename it :)

@dac09 dac09 enabled auto-merge (squash) May 20, 2024 03:09
@dac09 dac09 merged commit 1f277ef into redwoodjs:main May 20, 2024
46 checks passed
@dac09 dac09 deleted the chore/rename-serverAuthContext-to-serverAuthState branch May 20, 2024 14:21
Josh-Walker-GM added a commit that referenced this pull request May 20, 2024
**Problem**
#10643 did some renaming but
looks like there was just one more `serverAuthContext` that needed
switched over to `serverAuthState`. I noticed this just because the CI
was failing on renovate PRs.

**Note**
I'll merge this now and we can discuss retroactively if I misinterpreted
anything since I haven't been in the middleware space as much. It's
awesome work can't wait for all this to get out into stable for people
to enjoy!
dac09 added a commit to dac09/redwood that referenced this pull request May 21, 2024
…tuples-dbauth-mw

* 'main' of github.com:redwoodjs/redwood:
  fix(deps): update dependency isbot to v5 (redwoodjs#10340)
  chore(deps): update dependency vscode-languageserver-protocol to v3.17.5 (redwoodjs#10351)
  chore(deps): update node.js to >=14.17 <=20.13 (redwoodjs#10368)
  fix(deps): update dependency graphql-sse to v2.5.3 (redwoodjs#10364)
  chore(deps): update dependency @supabase/supabase-js to v2.43.2 (redwoodjs#10365)
  chore(deps): update babel monorepo to v7.24.5 (redwoodjs#10614)
  fix(vite): Rename `serverAuthContext` to `serverAuthState` (redwoodjs#10653)
  feat(middleware): Add .shortCircuit to MiddlewareResponse (redwoodjs#10586)
  chore(ssr): Make entry.client.tsx better match standard entry.client (redwoodjs#10652)
  patch(crwa): Fix small annoyances (formatting, spell-check) (redwoodjs#10651)
  chore(ci): Update rsc readme (redwoodjs#10650)
  chore(serverAuth): Rename serverAuthContext to serverAuthState where relevant (redwoodjs#10643)
  chore(deps): Remove unused deps from prerender (redwoodjs#10649)
  Add missing rwjs/auth deps (redwoodjs#10648)
  feat(rsc-auth): Implement serverStore to hold and pass req info to RSC (redwoodjs#10585)
  chore(deps): Remove unused octokit package (redwoodjs#10645)
  chore(deps): bump @fastify/reply-from from 9.4.0 to 9.8.0 (redwoodjs#10644)
@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:chore This PR is a chore (means nothing for users)
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants